hey guys, I am struggling with a scenario which I ...
# help
v
hey guys, I am struggling with a scenario which I expected to be simple (switched recently from Mountebank): I want Wiremock to respond to 50% requests with 200 and to the other 50% with 500. I use Wiremock as docker container. I expected this to be doable without a Java extension...
b
There’s a potential solution in this thread: https://groups.google.com/g/wiremock-user/c/UND_HW_eTLY As a tester and automation engineer I typically don’t recommend using this kind of nondeterminism but I’m sure you know what you’re doing ;)
v
the scenarios approach worked great for me, it's rather deterministic if you make a loop out of it 🙂 thanks!
b
Excellent. I read your question as ‘I need WireMock to decide to return a 200 or a 500 with 50% probability every time’ instead. Happy to hear that you worked it out using a scenario.
🙌 1