When it keeps being your turn
Being tested is ordinary in the Qur'an. The question is put near the opening of a chapter, "Do people think they will be left alone to say, 'We believe,' without being tested?" (29:2), and it is asked of everyone. The book then spends much of its length showing what that looked like for the people it names, prophets included.
What counts as a test is drawn wider than most people expect. The obvious form is listed in plain items: "fear and hunger, and loss of wealth and lives and fruits" (2:155). The less obvious form arrives as good fortune, which 21:35 sets in the same line, "we test you with evil and with good as a trial". When a person receives a blessing and credits it to his own cleverness, the correction is gentle: "it is a test, but most of them do not know" (39:49). Surah 89 shows one man misreading in both directions, taking honour as proof of God's favour and a narrowed income as proof of his contempt.
The purpose given for it stays consistent. Life and death were made "to test which of you is best in deed" (67:2), which places the measurement in what a person does with a situation rather than in the situation itself. That is a demanding standard and a merciful one, since the part being weighed is the part still in your hands.
None of this makes the experience feel purposeful while it is happening. The Qur'an records the point where the strain becomes almost unbearable and lets it stand: "Or did you think you would enter the garden without facing what those who passed before you faced?" (2:214), then describes people shaken until they cried out, "When will God's help come?" Musa, whose early life ran from one danger to the next, is told "we tested you with trial after trial" (20:40). Naming the accumulation matters, because accumulation is usually the part that is hardest to carry.
What the Qur'an offers in the middle of it is company more than explanation. God's help is called near in the same passage as the shaking, and the good news in 2:155 goes to those who were patient, which assumes the patience was difficult to hold. If the testing has left you angry, that response has its own place here, gathered in verses about being angry at God. For the endurance side of it, see verses about patience and hardship.