Hi everyone, I have a scenario of 3 instances of s...
# help
e
Hi everyone, I have a scenario of 3 instances of standalone wiremock in a CF environment that are serving my test requests, I have achieved the stateful setup with scenarios, but now have the problem that I would like to distribute the scenario states between my instances. What would be your recommendations how to achieve this?
b
My personal recommendation is 'don't do it as you're likely making things overly complex', but that's of no use to you 🙂 Have you seen https://github.com/wiremock/wiremock-state-extension ? I've never used it but it seems exactly what you're looking for
Oh wait, that's only for multiple stubs in a single WireMock instance from the looks of it. If you really want to reuse state across different WireMock instances I guess you'll have to use a database or file system and serve event listeners (https://wiremock.org/docs/extensibility/listening-for-serve-events/) to read / write the required data from / to the DB or FS