God tempts, tries and searches.
In Genesis 22, the Bible tells us that God does temp man.
Genesis 22:1 And it came to pass after these things, that God did tempt Abraham...
It's important to understand the character of God's tempting. James 1 tells us it is NOT according to, or with evil.
James 1:13 Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man:
However, the character of God is such, that it temps, tries and searches with a righteous purpose, not an evil purpose.
1 Thessalonians 2:4 But as we were allowed of God to be put in trust with the gospel, even so we speak; not as pleasing men, but God, which trieth our hearts.
Jeremiah 11:20 But, O LORD of hosts, that judgest righteously, that triest the reins and the heart, let me see thy vengeance on them: for unto thee have I revealed my cause.
Romans 8:27 And he that searcheth the hearts knoweth what is the mind of the Spirit, because he maketh intercession for the saints according to the will of God.
A good teacher will give a test to see what YOU have learned. The test reveals to the teacher where your strengths and weaknesses are. It's a way for the teacher to gain more information about you.
With the understanding that God did tempt Abraham (Gen 22:1), let's jump down to verses 11-12.
Genesis 22:11-12 And the angel of the LORD called unto him out of heaven, and said, Abraham, Abraham: and he said, Here am I. And he said, Lay not thine hand upon the lad, neither do thou any thing unto him: for now I know that thou fearest God, seeing thou hast not withheld thy son, thine only son from me.
Notice the phrase: for NOW I know.
God didn't say or suggest: I ALREADY knew. As if fixed determinism is the character of God.
In Genesis 22, it would have been pretty weird if God set up this testing, tempting and trying of Abraham, if he already robotically, pre-programmed Abraham.
The Bible says: for the Lord God omnipotent reigneth.
God, the omnipotent Lord over all, is powerful enough to limit His knowledge, yet at the same time: temp, try and search our hearts to increase His knowledge of us.
Don't count on fixed determinism to rule your life. That is an unbiblical philosophy of men. Instead, consider this prayer:
Psalm 139:23-24 Search me, O God, and know my heart: try me, and know my thoughts: And see if there be any wicked way in me, and lead me in the way everlasting.