It's just like with us.
1 Peter 1:6-7 KJV
6) Wherein ye greatly rejoice, though now for a season, if need be, ye are in heaviness through manifold temptations:
7) That the trial of your faith, being much more precious than of gold that perisheth, though it be tried with fire, might be found unto praise and honour and glory at the appearing of Jesus Christ:
Verse 7, the trial of your faith, is literally "that the proving of your faith . . ." God knows the truth of your faith, but you endure trials so that you will know the reality of your faith. You will find it is true even after begin put to the test.
Much love!