test the LORD: This is explained in 17:7. The people doubted that God was with them. They questioned whether he cared for them. They demanded proof that he was present and would help them.
There is a kind of testing that comes from faith. A person may believe, yet still struggle with doubt (“I do believe; help my unbelief,” Mark 9:24). This is a humble request for help.
But there is also a test that comes from unbelief (“so that we may see it and believe You? What will You do?” John 6:30). They wanted proof before they would trust him.
A test based on doubt puts God on trial. It treats God as if he must prove himself to us. It places us in the position of judge and God in the position of the one being judged.