Why God Tests Us When He Already Knows The Results?
The test if for man, who has to go through it to reach his destination in the hereafter, not of God. Therefore, He knows it in advance or not, does not nullify the test, it has to be organized for man.