Different xtians and other theists will offer different explanations.
From some POVs, like Calvinism and Universalism, life is not a test.
From some POVs, like Open Theism, God does not know the future.
As an open theist universalist I don't see the primary focus of life being a test, nor do I think God knows the future.