Prophet Hud - 11:7 "He it is Who created the heavens and the earth in six days, to test which of you is the best in work. His sovereignty was over the waters. Nevertheless, if you say to the disbelievers, "You will be resurrected after death,"they will say, "This is only clear magic."
Related:
The Kneeling/45:22 Allah created the heavens and the earth for a purpose, so that every soul may be recompensed for what it has earned, without injustice.

The Kingdom/67:2 He it is Who created death and life to test which of you is best in deeds. He is the Exalted, the Forgiving.

The Cow/2:155 We will test you with fear, hunger, loss of money, lives, and crops. Give good news to those who are patient.

The Cave/18:7 We have adorned the earth with its materials to test who will be righteous.

The Prophets/21:16 We did not create the heavens and the earth and all that is between them for play.

Prophet Hud/11:7 "He it is Who created the heavens and the earth in six days, to test which of you is the best in work. His sovereignty was over the waters. Nevertheless, if you say to the disbelievers, "You will be resurrected after death,"they will say, "This is only clear magic."