"(That He may) test you" means: to put you to the test. "(As to) which of you is best in deed, and He is the Almighty" in His retribution, "the Oft-Forgiving" to whoever believes.
﴿ليَبْلُوكُمْ﴾ لِيَخْتَبِرَكُمْ ﴿أَيُّكُمْ أَحْسَنُ عَمَلا وَهُوَ الْعَزِيز﴾ فِي نقمته ﴿الغفور﴾ لمن آمن.