Is it OK to test (or tempt) God?
Yes, certain kinds of tests are okay.
The wet / dry wool test worked well for Gideon.
And Gideon said unto God, If thou wilt save Israel by mine hand, as thou hast said, Behold, I will put a fleece of wool in the floor; and if the dew be on the fleece only, and it be dry upon all the earth beside, then shall I know that thou wilt save Israel by mine hand, as thou hast said. And it was so: for he rose up early on the morrow, and thrust the fleece together, and wringed the dew out of the fleece, a bowl full of water. And Gideon said unto God, Let not thine anger be hot against me, and I will speak but this once: let me prove, I pray thee, but this once with the fleece; let it now be dry only upon the fleece, and upon all the ground let there be dew. And God did so that night: for it was dry upon the fleece only, and there was dew on all the ground. Judges 6:36-40
The Elijah light-my-fire test is another option.
Elijah the prophet came near, and said, LORD God of Abraham, Isaac, and of Israel, let it be known this day that thou art God in Israel, and that I am thy servant, and that I have done all these things at thy word. Hear me, O LORD, hear me, that this people may know that thou art the LORD God, and that thou hast turned their heart back again. Then the fire of the LORD fell, and consumed the burnt sacrifice, and the wood, and the stones, and the dust, and licked up the water that was in the trench. 2 Kings 18:36-38
And the turn-the-sun-back-10-degrees test worked well for Isaiah and Hezekiah.
And Hezekiah said unto Isaiah, What shall be the sign that the LORD will heal me...? And Isaiah said ... shall the shadow go forward ten degrees, or go back ten degrees? And Hezekiah answered, It is a light thing for the shadow to go down ten degrees: nay, but let the shadow return backward ten degrees. And Isaiah the prophet cried unto the LORD: and he brought the shadow ten degrees backward. 2 Kings 20:8-11
No, God doesn't like to be tested or tempted.
Ye shall not tempt the Lord your God. Deuteronomy 6:16