Terry
02/10/2023, 7:33 PMstubFor(any(urlPathEqualTo("/everything"))
.withQueryParam("search_term", equalTo("WireMock"))
.withQueryParam("search_term", equalTo("Wireshark"))
I have a stub like this that works fine initially, but when I make another stub that would change out "WireMock" for something else like "HungryAnts", it would still make the response for the above stub. So I'm wondering should I use equalTo or something else when I use queryParam? I want my stub to go to the exact file that has this specific url.Tom
02/10/2023, 8:53 PMwithQueryParam(…)
twice on one stub for the same parameter name?
That won’t work - the second call will overwrite the first.
If you create two separate stubs that are the same but with different values inside equalTo(…)
I think this will do what you’re looking for.Terry
02/10/2023, 9:07 PMTom
02/10/2023, 9:23 PMTerry
02/10/2023, 11:09 PMTom
02/11/2023, 5:27 PM