Sometimes God tests individuals.
Genesis 22 records one of the Bible's more heartwrenching stories. Abraham had walked with GOD for years since GOD called Abraham to leave his homeland. GOD knew Abraham's character.
And yet, GOD tested Abraham—with the greatest test of Abraham's life.
1 Now it came to pass after these things that God tested Abraham, and said to him, “Abraham! Abraham!” And he said, “Here I am.” 2 Then He said, “Take now your beloved son, Isaac, whom you love, and go to the land of Moriah, and offer him there as a whole burnt offering on one of the mountains I tell you.”
(Genesis 22:1-2 OSB)
Genesis 22 shows how Abraham passed that test. Hebrews gives us insight into Abraham's mindset regarding this challenge:
17 By faith Abraham, when God tested him, offered Isaac as a sacrifice. He who had embraced the promises was about to sacrifice his one and only son, 18 even though God had said to him, “It is through Isaac that your offspring will be reckoned.” 19 Abraham reasoned that God could even raise the dead, and so in a manner of speaking he did receive Isaac back from death.
(Hebrews 11:17-19 NIV)
The Bible gives multiple accounts of GOD testing individuals. For example, in Exodus 16, we read how GOD tested the Israelites with a special instructions about how much manna to gather on the sixth day (since they were to rest on the sabbath):
4 Then the Lord said to Moses, “Behold, I will rain bread out of heaven for you; and the people shall go out and gather a certain quota every day, that I may test them, whether they will walk in My law or not. 5 So it shall be on the sixth day, they shall prepare what they bring in, and it shall be twice as much as they gather daily.”
(Exodus 16:4-5 OSB)
GOD tested Israel in the 40-year wilderness wanderings (see Deuteronomy 8:2) and with a refusal to purge more Canaanites from the land once Israel failed to follow through with GOD's instructions (Judges 2:20-23).
King David acknowledged that GOD tests every person's heart:
17 I know also, O Lord, that You search the heart and You love righteousness.
(1 Chronicles 29:17a OSB)
There, the Hebrew Bible reads "You test the heart..."
Job's entire suffering was brought about as a test, a heavenly experiment of sorts, to see whether Job only loved GOD because GOD had blessed him richly.
Esther was tested for courage, as were Shadrach, Meshach, Abednego and Daniel in Babylon.
Solomon wrote this proverb:
3 As silver and gold are tested in a furnace, So are chosen hearts before the Lord.
(Proverbs 17:3 OSB)
Jesus was tested in the wilderness (see Matthew 4; Luke 4).
Peter warned the Christians of his day about the tests they were, and would soon be enduring:
12 Dear friends, do not be surprised at the fiery ordeal that has come on you to test you, as though something strange were happening to you.
(1 Peter 4:12 NIV)
And, in Revelation 3:10, Jesus mentioned sparing the Christians in Philadelphia from the fiery trial that was going to come upon the whole world then.
So, the evidence is clear, GOD knows our hearts and may choose, from time to time, to test our faith and character to see if we will pass the test.
Sometimes people ask how GOD testing someone is different than Satan tempting someone.
I believe the answer is in the motivation and desired outcome. GOD tests with the intent to validate or bring about a positive and godly character and outcome. Satan tempted with the desire of pulling the person towards evil and away from GOD, producing death rather than godly character.