It is certainly the case that God knows how we act and live in this world. He sends us to be tested by Him so that we can improve our abilities and skills through the responsibilities He ordains for us. Not all of the men are created with the same ability and the same disposition rather they are in some sense like minerals to be worked upon to be purified and refined.
A person with artistic talents wants to express those talents and so is known through his works of art. In the same way the majesty and splendor and artistry of the creation of God is a presentation and reflection of His sacred Names and Attributes. To show human beings His art (Might. Power. Knowledge. Wisdom. Beauty and Mercy) He created the universe and exhibited aspects of His mysterious hidden treasures in it.

To show us how His Names. Attributes and Divine Art become manifest; He created the universe step by step. In different qualities and quantities. He grants us countless opportunities to get to know Him better; endless ways to acquire sound knowledge about Him. He is the absolute Creator who makes everything from one and adds to whatever He wills thousands of additional benefits. Thus it is that for example carbon may be manifest as coal or diamond and each further refined and adapted to a multitude of different uses.

Through whatever is created and exhibited in the universe and is given to man man himself is tested purified and prepared as a candidate for eternal bliss in paradise. In the same way raw materials are refined purified and processed into silver gold or diamonds.

We are tested in this world so that we may become clarified purified and attain virtue and perfection. Even though God knows how well or otherwise we perform in the test.

He tests us all the same. It is not because He does not know and wants to learn what He does not know through us rather He knows and accordingly tests a man against himself and man against others. When we make strenuous efforts to refine ourselves to find out and prove what we are what we have and whether we are worthless and valueless like iron or great like gold we are only acting as a means to make happen what God already knows from eternity. We are tested in what we strive for and in what we exert ourselves to do. In this way we shall enter the presence of God and give account of ourselves to Him.

We are being tested against ourselves in all that we have-all the members of our bodies all our faculties of thought and feeling and all the opportunities we have been granted to use them. God. Exalted is He does not test us because He wants to know how we do in the test but because He wants to show us ourselves so that we become aware that we are testing ourselves and being tested.