As you have mentioned since Allah is omniscient, divine tests are not designed to unveil something that is unknown for Him. The following points are some reasons why Allah subject us to His tests:
1.In the book Osul Al-Kafi there is a tradition from Imam Ali bin Musa al-Rida (a.s) saying:
"یفتنون کما یفتن الذهب ثم قال یخلصون کما یخلص الذهب"
people are tested as gold is tested and people are purified as gold is
purified.
"Fitnah" means melting gold roe for the purpose of removing its impurities. Sins opportunities, tragedies and disasters are playing the role of fire that helps human being to get rid of his impurities in order to reach perfection.
2.Bodybuilders have to go through strenuous exercises to develop big and strong muscles. Scientists go through years and years of hard studying to reach a high level of knowledge. Likewise, in order for human being to reach his perfection, he has to go through difficult divine tests so that he can develop strong divine muscles and reach a high level of perfection.
3.In Surah Towbah verse 126 we read:
أَوَ لا يَرَوْنَ أَنَّهُمْ يُفْتَنُونَ في كُلِّ عامٍ مَرَّةً أَوْ مَرَّتَيْنِ ثُمَّ لا يَتُوبُونَ وَ لا هُمْ يَذَّكَّرُونَ
Do they not see that they are tried once or twice every year? Yet they neither repent, nor do they take admonition.
Unless there were no illness we would remain blissfully ignorant of the blessing of our "health". Unless we encountered a danger, we would not comprehend the real meaning of safety. Human being is heedless of his final destination where he will be held accountable to all his deeds. Allah subject him to different tests to awaken him from the sleep of heedlessness especially when he is staggering drunkenly due to the abundance of blessings like power, health and wealth.
4.According to Quranic point of view both depriving and granting blessings are considered TEST.
In Surah Fajr verses 15 and 16 we read:
فَأَمَّا الْإِنْسانُ إِذا مَا ابْتَلاهُ رَبُّهُ فَأَكْرَمَهُ وَ نَعَّمَهُ فَيَقُولُ رَبِّي أَكْرَمَنِ
As for man, whenever his Lord tests him and grants him honour and blesses him, he says," My Lord has honoured me."
وَ أَمَّا إِذا مَا ابْتَلاهُ فَقَدَرَ عَلَيْهِ رِزْقَهُ فَيَقُولُ رَبِّي أَهانَنِ
But when He tests him and tightens for him his provision, he says," My Lord has humiliated me."
We are being tested whether we are poor or wealthy, sick or healthy. So the bottom line is that we should always stay alert so that we can get successfully through all these tests.