If fully charged, then use a hydrometer to check the specific gravity of the battery. Load testing requires a load tester, but SG tells you a lot. Odds are the battery is OK, so verify each wire and connection in the system from battery to starter is OK. When it's acting up, you can jumper the solenoid to see if it always cranks OK. If all else passes, probably have a bad solenoid.