That is an excellent question! Let’s look a classic example of God testing someone in Genesis 22:1-14, the account of Abraham offering up his son Isaac in obedience to God’s command.

We see the TEST in verses 1-2, “Now it came to pass after these things that GOD TESTED ABRAHAM, and said to him, ‘Abraham!’ and he said, ‘Here I am.’ Then He said, ‘Take now your son, your only son Isaac, whom you love, and go to the land of Moriah, and offer him there as a burnt offering on one of the mountains of which I shall tell you’” (NKJV). I can’t think of a more solemn test than this in the Bible.

We see ABRAHAM’S OBEDIENCE in verses 3-9. Due to space limitations I will only quote verses 3 and 9-10, “So Abraham rose early in the morning and saddled his donkey, and took…Isaac his son…and arose and went to the place of which God had told him…Then they came to the place of which God had told him. And Abraham built an altar there and placed the wood in order; and he bound Isaac his son and laid him on the altar, upon the wood. And Abraham stretched out his hand and took the knife to slay his son.” Abraham OBEYED IMMEDIATELY and EXACTLY as God had commanded him.

We see GOD’S REACTION in verses 11-12, “But the Angel of the LORD called to him from heaven and said, ‘Abraham, Abraham!’ So he said,” Here I am.’ And He said, ‘Do not lay your hand on the lad, or do anything to him; FOR NOW I KNOW THAT YOU FEAR GOD, since you have not withheld your son, your only son, from Me.” God never intended Abraham to actually sacrifice his son Isaac, so He stays his hand and then pronounces, “Now I know that you fear God.”

Many have seized upon this verse to challenge the truth that GOD IS OMNISCIENT (i.e. all-knowing). On the surface it seems they have a valid point, for it seems as if God DID NOT KNOW WHAT ABRAHAM WOULD DO until this moment. But if this were so it would contradict many scriptures which reveal that God is indeed OMNISCIENT. One such verse is Acts 15:18, “Known to God from eternity are all His works.” Another excellent verse is 1st John 3:20, “God is greater than our heart, and KNOWS ALL THINGS.” I believe the answer is quite simple (though our human logic and reasoning may reject this). Though God KNEW that Abraham would obey Him because of His foreknowledge of all things, but He NOW KNEW IT BY ACTUAL EXPERIENCE! In other words, though God knew what would happen, He now experienced it in a real life experience and was able to enjoy and appreciate Abraham’s obedience. Because of this, God could say in truth, “Now I know that you fear God.” It’s as if God is saying, “Now I know by actually seeing you demonstrate your faithful obedience in living action that you fear Me.” Again, God KNEW IT WOULD HAPPEN, but now He KNOWS IT BY A REAL PRESENT EXPERIENCE. So, as another has said, “God has witnessed and experienced in this moment what He had always known, and it is this that is communicated by the phrase, ‘for now I know.’”

In closing, God tests His people to “prove the reality of their faith.” It’s not that He doesn’t know that their faith is genuine, but by testing them in a real life experience He is then able to enter into their faith and fear of Him by SEEING their obedience in real time. Of course, He also tests His people so others will see the reality of their faith (see James 2:14-26).  (377.3)  (DO)