Almighty Allah tests His servants with good and bad things, with adversity and prosperity. These tests may be a means to grant them rewards and high degrees in Paradise. This occurred with many Messengers and Prophets and many righteous servants of Allah. Our Prophet (peace and blessings be upon him) is reported as saying, “The people most subject to affliction are the prophets, then come the righteous, and after them come the best people all according to their goodness.”

Sometimes, afflictions may be a result of one’s sins and keeping aloof from the way of Allah. In this meaning comes the verse that reads,  ( Whatever of misfortune striketh you, it is what your right hands have earned. And He forgiveth much) (Ash-Shura 42:30).

The prominent Muslim scholar Sheikh Muhammad Iqbal Nadvi, director and imam of Al-Falah Islamic Center, Oakville, Ontario, Canada, states:

“Life in itself is a trial and test. Allah says,  ( He Who created Death and Life, that He may try which of you is best in deed: and He is the Exalted in Might, Oft-Forgiving) (Al-Mulk 67:2).

So, in the sense of tests, Allah tests people to confirm their commitment to Islam. He puts them through different situations and conditions to check if they commit to Islam in all situation or not. Allah wants to make sure if the people are sincere in their claim of faith or not.

The second type of test is to put some people through various difficulties in order to elevate their ranks. The more a person is committed to Islam, the more tests he or she would get.

The third test is that Allah puts people through tribulations in order to remove their sins and bad deeds. As reported in Al-Bukhari, Abu Hurairah narrated that Prophet Muhammad (peace and blessings be upon him) said, “No fatigue, nor disease, nor sorrow, nor sadness, nor hurt, nor distress befalls a Muslim, even if it were the prick he receives from a thorn, but that Allah expiates some of his sins for that.”

The fourth category of test is fitnah, which means a trial to remove the sickness and weakness of behaviour in some people or make them examples for others. Allah says, ( In order that Allah may separate the impure from the pure, put the impure, one on another, heap them together, and cast them into Hell. They will be the ones to have lost)(Al-Anfal 8:37).

We can easily understand the difference between a test that is meant for punishment and a test for anything else. If someone does something good and still suffers, it means it is a test to increase good rewards. It is reported that `A’ishah was informed about someone who spoke ill about Abu Bakr after he passed away. So she said, “Allah wants to increase his reward (Abu Bakr) even after his death.”

But if someone does not do something wrong and afterwards he gets in some troubles, then it is a test for other reasons. It is reported that a person was brought to `Umar after being caught doing something wrong. So he asked `Umar to forgive him on the account that it was the first time, so `Umar said, “No, Allah put you in that position only after He had given you so many chances to repent.”

In conclusion, punishment that inflicts the person here, according to more than one hadith, will diminish the hereafter’s punishment. These things are definitely true and they are not myth as you stated. As Muslims, we believe that everything that the Qur’an says is the true; so we are informed about these things through the Qur’an and Sunnah of the Prophet (peace and blessings of Allah be upon him).