Mankind is tested in different areas since very early on. Most of them are aimed at determining one’s abilities and aptitudes. But divine tests are different since God knows everything.
The tests given by God are aimed at training and developing man’s capacities. The Hoy Quran says in verse 154 of Surah Al Imran: “… so that Allah might try what was in your chests and that He will examine what is in your hearts. And Allah knows the innermost of the chests.”
This is a general rule that God examines people in order for burgeoning of their aptitudes and developing their capacities for growth. Just like steel is exposed to heat in furnace to become stronger, mankind get stronger by facing hardships and adversities.
Imam Ali (AS) says about divine tests that although God knows people even better than themselves, He examines them so that good and bad deeds that deserve reward or punishment are manifested.
In other words, people’s inner attributes cannot be considered as criteria for reward and punishment unless they are manifested in actions. So God tests His servants so that they will manifest in action what is in their heart.
The Quran mentions some issues with which people are tested. They include: fear, hunger, financial losses, death, children, prophets, divine commandments, and good and evil things.