I'm just switching from Mockserver to Wiremock in ...
# wiremock-java
k
I'm just switching from Mockserver to Wiremock in a client project and now there are some test failures because I obviously did something wrong - so I'd like to see the logging of Wiremock to be able to see what exactly is happening. However, I can't find out how to set the notifier to verbose while using @WireMockTest. How do I achieve this?
I rewrote one test class with the programmatic approach to be able to set the Notifier to verbose. But what I wanted to see doesn't seem to get logged. There is something wrong with my scenarios and I thought I could see the current state and the state switch of a scenario when a request matches a stub in a scenario... Is there no way to see this?
b
Have you tried adding a custom ServeEvent listener? See the docs: https://wiremock.org/docs/extensibility/listening-for-serve-events/ Note: I don’t know if a scenario state change triggers a WireMock event so I’m not sure if it will solve your problem, but it might be worth a try.
k
I'll have a look, thanks!