r/SpringBoot • u/tomakehurst • Dec 06 '24
Spring Boot + WireMock integration
Hey r/SpringBoot! The official WireMock + Spring Boot integration is now available: https://wiremock.org/docs/spring-boot/
Mocking APIs with WireMock in Spring Boot integration tests is a very common approach for achieving isolated, deterministic tests, but integrating the two can be painful due to the challenges around managing random port numbers.
The WireMock Spring Boot integration solves this problem by supporting annotation-driven configuration of one or more WireMock instances, plus injection of URLs and port numbers as Spring properties.
We’ve written a bit more about this here: https://www.wiremock.io/post/wiremock-now-has-an-official-spring-boot-integration
1
u/Majestic_Scratch522 Dec 06 '24
What's that is it like mockito ?
2
u/tomakehurst Dec 06 '24
It works at the HTTP layer over a network connection rather than substituting objects in memory like Mockito does, but many of the concepts like stubbing and verification work in a similar way.
3
Dec 06 '24 edited Apr 17 '26
Data brokers are selling your info right now. I used Redact to mass delete my posts which can also opt out of data broker sites. Instagram, Twitter/X, Discord and more.
familiar swim hospital nutty profit school busy file marble ink
2
2
2
2
u/Sheldor5 Dec 06 '24
what is the difference/advantage to https://www.mock-server.com/ ?