"Or think you that you will enter Paradise without such (trials) as came to those who passed away before you?" [Soorah al-Baqarah (2): 214] ?
Every believer will have to go through the tests of Eeman in order to attain victory in this world and Paradise in the Hereafter.
Allah will test every believing slave according to his level of faith
Allah said: "Alif-Laam-Meem. Do people think that they will be left alone because they say: 'We believe,' and will not be tested?" [Soorah al-Ankaboot (29): 1-3] This is an admonition in the form of a question, meaning that Allah will inevitably test His believing servants according to their level of faith, as it is recorded in the authentic Hadeeth. The Messenger of Allah (sallallahu alaihi wa-sallam) said: "The people most severely tested are the Prophets, then the righteous, then the next best and the next best. A man will be tested in accordance with the degree of his religious commitment; the stronger his religious commitment, the stronger his test." [Tuhfat al-Ahwadhi (7:78)]
But those who are not believers will not escape such trials and tests for ahead of them lies a severe punishment as Allah says: "Or think those who do evil deeds that they can outstrip (escape) Us? Evil is that which they judge!" [Soorah al-Ankaboot (29): 4]
"Allah will not leave the believers in the state in which you are now, until He distinguished the wicked from the good." [Soorah al-Imran (3): 179] Allah allows a calamity to happen, and during this calamity His friends become known and His enemies exposed, the patient believer recognized and the sinful hypocrite revealed. "Nor will Allah disclose to you the secrets of the Unseen." [Soorah al-Imran (3): 179] meaning you do not have access to Allah's Knowledge of His creation so that you can distinguish between the believer and the hypocrite, except by signs that Allah uncovers.
Even Previous Nations were tried and tested with calamities and oppression from the Kuffar but the Final Victory is always for the believers
In an authentic Hadeeth, it is reported that Khabbab Ibn al-Aratt said: "We said: 'O Messenger of Allah! Why do you not invoke Allah to support us? Why do you not supplicate to Allah for us?' He said: "Among the people who came before you, there was a man who was taken and put into a hole dug for him in the earth, then a saw was put on his head and he was cut into two pieces, and an iron comb was used to tear the flesh from his bones, but this still did not turn him away from his religion." [Reported by al-Bukharee, see Fath al-Baaree, (12/315)] He (sallallahu alaihi wa-sallam) then said: "By Allah! This matter (religion) will spread (or expand) by Allah until the traveler leaves San'aa to Hadramat fearing nothing except Allah and the wolf that may attack his sheep." [See Fath al-Baree (7/165)]
Allah says: "Or think you that you will enter Paradise without such (trials) as came to those who passed away before you? They were afflicted with severe poverty and ailments and were so shaken that even the Messenger and those who believed along with him said: 'When (will come) the help of Allah?' Yes! Certainly, the help of Allah is near!" [Soorah al-Baqarah (2): 214] Meaning that you will be tested like the nations before you were tested and tried with illness, pain, disasters and hardships so much that they pleaded (to Allah) for victory against the enemies and invoked Him for aid and deliverance from their hardships and trials.
Allah says in Soorah al-Imran, "Many similar ways (and mishaps of life) were faced [by nations (by believers and disbelievers) that have passed away] before you, so travel through the earth, and see what was the end of those who denied. This is a plain statement for mankind, a guidance and instruction for the Muttaqun. So do not become weak, nor be sad, and you will be triumphant if you are indeed believers. If a wound has touched you, be sure a similar wound has touched the others. And so are the days, that We give to men by turns, that Allah may know (test) those who believe, and that He may take martyrs from among you. And Allah likes not the wrongdoers. And that Allah may test those who believe and destroy the disbelievers. Do you think that you will enter Paradise without Allah knowing those of you who fought (in His cause) and knowing those who are the patient?" [Soorah al-Imran (3): 142]
These verses were revealed after the defeat of Muslims in the battle of Uhud. Allah states to His believing servants who suffered losses in the battle of Uhud that similar mishaps were faced by the previous nations who followed Prophet, they too suffered losses. However, the good end was theirs and ultimate defeat was for the disbelievers. This is why Allah said: "so travel through the earth and see what was the end of those who denied. This is a plain statement for mankind." The Qur'aan contains the news of past, it explains the true reality of things and narrates how the previous nations suffered at the hands of their enemies.
Then Allah comforts the believers saying, "So do not become weak," because of what you suffered for surely the ultimate victory and triumph will be yours, O believers. If you suffered injuries and some of you were killed, then your enemies also suffered injuries and fatalities.
And at times, out of His Wisdom, Allah allows the enemy to overcome you, although the final good end will be for the believers so that those who are patient and those who gladly offer their lives seeking Allah's Pleasure may be known. Allah's statement, "and destroy the disbelievers" testifies that the disbelievers who transgress and commit aggression will be led to ultimate destruction, extermination, perishing and dying out.
Then Allah says, "Do you think that you will enter Paradise without Allah knowing those of you who fought (in His cause) and knowing those who are the patient?" meaning you will not earn Paradise until you are tested with such hardships.
When the Emperor of Rome asked Abu Sufyan, "Did you fight him (Prophet Muhammad sallallahu alaihi was-sallam)?" He said: "Yes" Heracles said: "What was the outcome of the warfare between you?" Abu Sufyan replied: "Sometimes we lose and sometimes he loses." He said: "Such is the case with Prophets, they are tested, but the final victory is theirs." [Fath al-Baree (9: 25)]
See how Allah consolidates His Prophet during his (sallallahu alaihi wa-sallam) trials, when the Quraysh disbelieved in his Message, mocked and gathered together against him. Allah explained: "And how many a Prophet have We sent among the men of old. And never came there a Prophet to them but they used to mock at him. Then We destroyed men stronger (in power) than these and the example of the ancient has passed away." [Soorah az-Zukhruf (43): 6-8] meaning 'We destroyed those who disbelieved in the Messengers, and they were stronger in power than those who disbelieve in you, O Muhammad (sallallahu alaihi wa-sallam). And We made them a lesson for those disbelievers who came after them, that they would suffer the same end as them, as also in the verse, "And We made them a precedent, and an example to later generations." [Soorah az-Zukhruf (43): 56]
Allah also explained in Soorah Ghafir that it is His Sunnah to humiliate and destroy the disbelievers at the hands of believers, even if the disbelievers were more in number and strength and the believers only a handful. "Have they not traveled through the earth and seen what was the end of those before them? They were more in number than them and mightier in strength and in the traces in the land; yet all they used to earn availed them not. Then when their Messengers came to them with clear proofs, they were glad (and proud) with that which they had of the knowledge (of worldly things). And that at which they used to mock, surrounded them. So when they saw Our punishment, they said: 'We believe in Allah and reject (all) that we used to associate with Him as (His) partners.' Then their faith could not avail them when they saw Our punishment. (Like) This has been the way of Allah in dealing with His servants. And there the disbelievers lost utterly." [Soorah Ghafir (40): 85]
A good example can be given of Musa (alaihi as-salaam) and his enemy; Firawn, who had much more strength and men than Musa (alaihi as-salaam). But Allah destroyed his army and drowned them all, and Firawn said as he was drowning, "I believe that none has the right to be worshiped but He Whom the Children of Israel believe, and I am one of the Muslims." [Soorah an-Anfal (10): 90] but Allah said: "Now (you believe) while you refused to believe before, and you were one of the corrupters." [Soorah an-Anfal (10): 91]
Thus, "That was the way of Allah in the case of those who passed away of old, and you will not find any change in the way of Allah." [Soorah Ahzab (33): 62] Therefore, the believers are required to trust Allah and His Promise that He will surely humiliate and destroy the disbelievers who commit oppression against the believers. But until then, the believers should persevere with patience in their trials because victory will only come after succeeding in these trials.
The Sahabah (radhi allahu anhum) were severely tortured by the disbelievers. They were forced to migrate leaving behind their family members and relatives and all their wealth and belongings. But they persisted in their Faith bore the oppression of the Kuffar in Makkah for ten years and then the hardships of migration to al-Medina, after which, Allah compensated them with the better in this world; He made them victorious, gave them power throughout the land and caused them to rule over the people who had forced them to migrate - they became governors and rulers, and each of them became a leader of the pious.
Allah tells us that His reward for the Muhajirin (migrants) in the Hereafter is greater than which He gave them in this world. He said: "and as for those who emigrated for the Cause of Allah, after suffering oppression, We will certainly give them goodly residence in this world, but indeed the reward of the Hereafter will be greater, if they but knew! (They are) those who remained patient (in this world for Allah's sake) and put their trust in their Lord" [Soorah an-Nahl (16): 41-42]
Conclusion: Every person who claims to be a true Muslim will be tested and tried by Allah. These trials can be in the form of starvation, famine or oppression from the disbelievers. When these trials take place, the believer is expected to succeed in these tests by practicing Sabr (patience), Tawakkul (trust in Allah that He will help him and support the religion) and with Istiqama (steadfastness) on his Deen because Allah does not grant Paradise or victory without Sabr, Tawakkul and Istiqama on the part of the believers.
One should also not deem that those who do not accept Islam will be saved from all afflictions and calamities because the respite given to them in this world will lead them to an eternal destruction in Hell-Fire! Whereas the believers who are tested with calamities that are very insignificant compared to the punishment of the Hereafter will be granted eternal pleasure in Paradise where there will be no trace of any hardship or suffering.