Men are forbidden in Scripture to test God (Exodus 17:7; Deuteronomy 6:16, Matthew 4:7; 1 Corinthians 10:9). So why does God command his people here to test him?
There is a difference between testing God’s promises by acting out of faith and trust in obedience to his command (as Israel is commanded in the text we are considering) and testing God’s promises by acting out of unbelief and distrust in disobedience to God’s command (see Numbers 14:22, which connects testing and disobedience). Furthermore, it is one thing for God to invite his people to test his faithfulness to his promises in order to strengthen their faith. It is another thing for God’s people to demand that God prove his faithfulness to his promises before they will believe.
10 Bring the full tithe into the storehouse, that there may be food in my house. And thereby put me to the test, says the LORD of hosts, if I will not open the windows of heaven for you and pour down for you a blessing until there is no more need.