ثُمَّ اَنۡزَلَ عَلَيۡكُمۡ مِّنۡۢ بَعۡدِ الۡغَمِّ اَمَنَةً نُّعَاسًا يَّغۡشٰى طَآٮِٕفَةً مِّنۡكُمۡۙ وَطَآٮِٕفَةٌ قَدۡ اَهَمَّتۡهُمۡ اَنۡفُسُهُمۡ يَظُنُّوۡنَ بِاللّٰهِ غَيۡرَ الۡحَـقِّ ظَنَّ الۡجَـاهِلِيَّةِؕ يَقُوۡلُوۡنَ هَلۡ لَّنَا مِنَ الۡاَمۡرِ مِنۡ شَىۡءٍؕ قُلۡ اِنَّ الۡاَمۡرَ كُلَّهٗ لِلّٰهِؕ يُخۡفُوۡنَ فِىۡۤ اَنۡفُسِهِمۡ مَّا لَا يُبۡدُوۡنَ لَكَؕ يَقُوۡلُوۡنَ لَوۡ كَانَ لَنَا مِنَ الۡاَمۡرِ شَىۡءٌ مَّا قُتِلۡنَا هٰهُنَا ؕ قُلۡ لَّوۡ كُنۡتُمۡ فِىۡ بُيُوۡتِكُمۡ لَبَرَزَ الَّذِيۡنَ كُتِبَ عَلَيۡهِمُ الۡقَتۡلُ اِلٰى مَضَاجِعِهِمۡۚ وَلِيَبۡتَلِىَ اللّٰهُ مَا فِىۡ صُدُوۡرِكُمۡ وَلِيُمَحِّصَ مَا فِىۡ قُلُوۡبِكُمۡؕ وَاللّٰهُ عَلِيۡمٌۢ بِذَاتِ الصُّدُوۡرِ(آل عمران :154)
Thumma anzala 'alaykum min ba'di alghammi amanatan nu'asan yaghsha taifatan minkum wataifatun qad ahammathum anfusuhum yathunnoona biAllahi ghayra alhaqqi thanna aljahiliyyati yaqooloona hal lana mina alamri min shayin qul inna alamra kullahu lillahi yukhfoona fee anfusihim ma la yubdoona laka yaqooloona law kana lana mina alamri shayon ma qutilna hahuna qul law kuntum fee buyootikum labaraza allatheena kutiba 'alayhimu alqatlu ila madaji'ihim waliyabtaliya Allahu ma fee sudoorikum waliyumahhisa ma fee quloobikum waAllahu 'aleemun bithati alssudoori
Sahih International:
Then after distress, He sent down upon you security [in the form of] drowsiness, overcoming a faction of you, while another faction worried about themselves, thinking of Allah other than the truth - the thought of ignorance, saying, "Is there anything for us [to have done] in this matter?" Say, "Indeed, the matter belongs completely to Allah ." They conceal within themselves what they will not reveal to you. They say, "If there was anything we could have done in the matter, some of us would not have been killed right here." Say, "Even if you had been inside your houses, those decreed to be killed would have come out to their death beds." [It was] so that Allah might test what is in your breasts and purify what is in your hearts. And Allah is Knowing of that within the breasts.
وَمَا كَانَ لَهٗ عَلَيۡهِمۡ مِّنۡ سُلۡطٰنٍ اِلَّا لِنَعۡلَمَ مَنۡ يُّـؤۡمِنُ بِالۡاٰخِرَةِ مِمَّنۡ هُوَ مِنۡهَا فِىۡ شَكٍّ ؕ وَ رَبُّكَ عَلٰى كُلِّ شَىۡءٍ حَفِيۡظٌ(سبإ :21)
Wama kana lahu 'alayhim min sultanin illa lina'lama man yuminu bialakhirati mimman huwa minha fee shakkin warabbuka 'ala kulli shayin hafeethun
Sahih International:
And he had over them no authority except [it was decreed] that We might make evident who believes in the Hereafter from who is thereof in doubt. And your Lord, over all things, is Guardian.
Complete Indexing of Quran Topics
We have indexed and found 2 verses about or related to (including the word(s)) "Test by Allah".
For your information, the verses as described above: