The solenoid is just an electrically operated switch, so usually, it either operates or doesn't. However, there could be a problem with the contacts inside the solenoid, so it seems to me that the easiest way to identify if the solenoid is the problem by restricting current flow to the starter motor would be to disconnect the power cable (the large wire from the battery to the solenoid) then have somebody activate the solenoid with the key while measuring the resistance between the two large poles on the solenoid. There should be almost zero resistance or else the contacts may be oxidized, pitted, dirty or interfering with current flow in some way, and in that case, the solenoid would probably need to be replaced. Some solenoids also engage the pinion gear to turn over the engine and those may be opened up to check the contact surfaces, on solenoids that do not engage the pinion, the resistance through the contacts could possibly be checked by simply jumping across the two large terminals on the solenoid and if it spins faster than when using the key, there is a problem with the solenoid, if the speed doesn't change one of the other problems listed in comments above is probably at play! Caution, keep in mind that gasoline or LPG engines will need the key on to run - do not turn the key on for this test, on some diesel engines, the key in the off position may not prevent the engine from starting, so if you test by jumping the terminals, BE SURE TO DISENGAGE THE TRANSMISSION SO THAT IF THE ENGINE STARTS NOBODY GETS RUN OVER!