Terry02/10/2023, 7:33 PM
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.
stubFor(any(urlPathEqualTo("/everything")) .withQueryParam("search_term", equalTo("WireMock")) .withQueryParam("search_term", equalTo("Wireshark"))
Tom02/10/2023, 8:53 PM
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
I think this will do what you’re looking for.
Terry02/10/2023, 9:07 PM
Tom02/10/2023, 9:23 PM
Terry02/10/2023, 11:09 PM
Tom02/11/2023, 5:27 PM