Mesilas Yesharim says, "Kol inyanei haolam nisyanos heim l'adam -- All matters in this world, everything, are tests for man."
That's a sweeping statement! What does it mean tests? Hashem has to test you to know what you are? He doesn't know beforehand what you're going to...