When men DO test women, it is usually because of a low self-image or they don't really have an interest in the woman in the first place. Women want men that can pass their tests. This shows them that their man is strong and capable and worthy of their affection. Fail the test and you're either going to get more tests, or lose the woman altogether. Frankly it can be difficult - unless you pay very close attention.
Tests take many forms but they all have the same pattern.
If you can begin to recognize the patterns, you will see the tests when they come. There are far too many examples of tests to cover them all here. Suffice it to say that, if an unexpected situation meets any or all of the above, you're probably getting The Test. Passing The Test Tests are not problems to be solved. They are situations created to determine how you will react.