Hi A Muslim. Like you, I used to be a Muslim. More than that, I lead the prayer because I was and am a Hafiz and people had sought my opinion in matters of figh, Aquidah and tafsir alike. One of the things that made me doubt the deity of Allah was the concept "this life is a test".
I wanted to know who the examiner or tester was. Then I found it was Allah, the all knowing God. But I found this to be inconsistent; the basic meaning of <test> in any authoritative dictionary of Arabic or English is "carrying out activities and or asking questions in order to establish the veracity or the truthfulness of things which have not previously been known to the examiner".
Thus, I ended up between two positions:
A - That Allah was examining us as it is mentioned in [67:2] in order to establish things which have not been previously known to Him. Therefore, Allah has been telling us an untruthful thing when He claims to know everything. Everything in this case includes that which had happened, and that which is happening and that which will happen and which did never happen if it were to happen, when, where and how it would have happened. This is me breaking down the meaning of omniscient. Therefore, this lying Allah cannot be the True God, because a true god does not need to lie.
B - That Allah knows everything beforehand and thus, His act of examining us is Him wasting His time because for Him to witness the coding or witnessing what he's written put in motion, which He knows to go according to plan, is nothing new and does not add anything to His never changing knowledge.
Thus, if He knows then why is He examining us, and if He does not know the outcome of the test, then why did He say He knows? Allah is either lying when He says he knows everything beforehand or He is being frivolous by having nothing better to do but witness mechanically what He has ordained to happen 50 thousand years before He created the heavens and earth.
The second position, that Allah is just witnessing His well-known plan coming to action by creating us, is inconsistent with things like His angry reaction to what we or other people do such as found in [43:55].
Anger is an emotional reaction to something unexpected. There should have been nothing unexpected to all-knowing Allah. Thus, if Allah gets angered or disappointed then He more likely hopes and wishes rather than He knows the outcome of everything; Allah could not know for a cert how anyone of us responds to anything of His wants (الإرادة الشرعية) if He at the same time gets disappointed and angered by the outcome. Therefore, 'disappointable' Allah simply lied by claiming He knows everything. (If in principle we risked angering Him, why did Allah create us in the first place?)
Allah has either lied by claiming complete knowledge of everything or He factually knows everything because He's written it thereby He preordained everything. If so, then nothing escapes His predestination and therefore, we sin because Allah has willed us to sin and we do not have any agency away from whatever He has written and planned for us.
This practically means Allah is unjust which is inconsistent with a god that says He is, as well as a god that needs to lie to us by telling us we have freewill when He had written everything and every possibility down before He created us. By telling us we are free agents for which we individually must earn our places when the examination is over in either Jannah or Jahannam, Allah is claiming to be allowing us to choose whatever our reason and desires may lead us to. Thus, Allah should have been emotionally ready and Allah should have been respectful of the outcome of giving us individual agency i.e. freewill. Allah cannot give us freewill and then when we act on it in ways which He does not like He angrily cries foul.
Square this circle convincingly for me and I promise to lead you in the Taraweeh of this year's Ramadan in London.
-------------------------------
Updated and proofread.
May peace be upon you. Thank you for your in-depth response. Firstly, I want to say that we cannot go to definitions which are created by man in order to understand what Allah's role is for us. I can easily find a dictionary which disagrees with your definition.
67:2 in the Qur'an states: ''[He] who created death and life to test you [as to] which of you is
best in deed - and He is the Exalted in Might, the Forgiving -'' This does not mean that Allah (SWT) does not know what we will do. Allah (SWT) knows what we will do because he is omniscient, but we as humans have been given free will in our lives so we can be evidence of ourselves for what we did on Earth and how we lived. Think about it this way: if Allah (SWT) never allowed us to live life and he straight away took us to Judgement Day, everyone will say that that will not be fair to do so because they never had the chance to put themselves into practice in becoming better Muslims, or even Muslims in general. They will then claim that if Allah (SWT) put them on Earth, then they would live life on what has been prescribed to us by the Qur'an and Sunnah. This will destroy the whole point of us looking for God and the true religion, so it won't be a test for us and this would be unjust on Allah's part if he didn't allow us to live life in the first place. However, he did allow us to live life. If I may add, the verse never indicates that Allah (SWT) is a liar. Astaghfirullah, I have no idea how you came to that reasoning.
''His act of examining us is Him wasting His time'' - Allah (SWT) has been here for an eternal period. How can he waste time? If he chose to create humans, then I don't think that is, ''wasting time'' on his part.
''Anger is an emotional reaction to something unexpected.'' - No. If I knew that my mother was going to be shot by someone, I hope you don't believe that I wouldn't be angry because I knew that it will happen. At the end of the day: she is dead and I won't be happy about it if it does happen and I know or didn't know. We must remember that Allah (SWT) does not speak in letters and songs. Allah (SWT) sent us the Qur'an in a way that his creation can understand, so do not try and bring me an argument that having emotions is a human character, or whatever if you will.