Of course you test it with a test light first, Check you have a 12v signal and also that there is 12v at the main post on the starter. Once you have done that and they are OK, If it still fails to motor then you can try what I mentioned previously. You could even go to the extent to take the wire off to the field housing and power it up with 12v too (If it still fails to motor then that is another good sign the brushes/armature are causing the fault). I must say that in 12 months of doing auto electrics, I have never seen a solenoid "free" by hitting it with a hammer, Nor bridge loose connections.. It is all about tracing the path of the circuit, I beg to disagree with you still not knowing what is wrong by the time you have hit it with a hammer if it is indeed brushes (mabey even armature) You would know where the fault lies. The solenoid feeds power to the field coils and brings the drive into mesh/holds it in mesh, it doesn't have any other function that would stop the motor spinning.
He has found the problem, But we are still on topic discussing how to diagnose the fault.