How to run multiple scenarios simultaneously on single multi-user standalone Wiremock instance

184 views
Skip to first unread message

Julian Skolozdra

unread,
Jun 9, 2022, 8:01:42 AM6/9/22
to wiremock-user
Use case:
- single "generic" standalone WM instance running in Docker container;
- many dev teams, each adding mappings for their own apps;
- mappings from teams do not intersect as request urls in all mappings are prefixed with ../<team_name>/path/to/my/endpoint
WM faithfully servers each teams own responses.

Problem:
if one teams mapping starts a scenario, it breaks all other teams scenarios cause apparently WM has single state machine engine for the whole WM instance.

Question:
is there currently a way to utilize scenarios on a single multi-user Wiremock instance?

P.S.: If not, is this feature already planned, or can it be implemented if requested?
Thanks in advance!

Mattias Green

unread,
Jun 9, 2022, 10:27:03 AM6/9/22
to wiremock-user
You can correlate on custom headers. For example a UUID as an HTTP header. Works like a charm for your use case. 

Tom Akehurst

unread,
Jun 9, 2022, 1:25:50 PM6/9/22
to wiremock-user
WM has a state machine per scenario, so it sounds like each team may be creating overlapping scenario names.

Perhaps if they add a namespace of some kind to their scenario names then it'll solve the problem.

Reply all
Reply to author
Forward
0 new messages