Hi everyone! My spring boot app makes calls to an...
# wiremock-java
r
Hi everyone! My spring boot app makes calls to an external service API that is not yet available, so I need to mock its responses for my integration tests. I am wandering what's the difference between using wiremock as a standalone and with testcontainers and when would I prefer to use each?
l
Hey, there probably isn't a huge amount of difference. Using wiremock standalone in your tests is perhaps a little quicker due to not having to spin up the container. If you are already using test containers for other dependencies, it can be nice to use the same process for all your external dependencies. To be honest, with the new spring boot integration we just released I would personally use that over test containers. https://wiremock.org/docs/spring-boot/ https://www.wiremock.io/post/wiremock-now-has-an-official-spring-boot-integration
r
Could the fact that containers run in isolation play as a factor in some cases?
l
I don't think this has ever been an issue in the projects I have seen
r
Ok, thank you!
l
If you are having any issues with using WireMock in your spring boot tests let us know 👍
r
Got it. Thanks!