I want to repeat a state of one scenario 3 times a...
# help
l
I want to repeat a state of one scenario 3 times and wanted to reset the state I am trying to use stateful behaviour of WireMock
Copy code
WireMock.setScenarioState("my_scenario", "state_2");
in Kotlin and Micronaut environment and it does not work
o
I need to check how the state would be handled there, because Micronaut might be tampering with context, especially in the native mode
l
Yes, I have used this.
WireMock
is not giving an option for
.setScenarioState
o
You mean the
WireMockContainer
?
In the Testcontainers module, you can set the state by an API call. At least you should be able to, but I do not see such APIs in the OpenAPU spec. CC @Tom @Rob Elliot https://wiremock.org/docs/standalone/admin-api-reference/#tag/Scenarios/paths/~1__admin~1scenarios/get
t
@Lopamudra Rath are you using the latest version of WireMock?
l
no, not the latest once. Let's see