Hi, thanks for this project as it looks like it can make handling WireMock within Spring Boot tests much easier!
We have a somewhat different use-case: we use JUnit5 to write and run "blackbox integration-style" tests. We need to use a static well-defined port for WireMock but we allow overriding it via Spring Property. We'd like to be able to use an existing SpringBoot Property to configure the WireMock Port.
We looked into using a WireMockConfigurationCustomizer to set the port, but this doesn't get the Spring Context passed into it as far as we could tell.
As a side note: The system under test runs in a different JVM, so our Spring Context only contains Test utilities. As such, it would not be a problem (it would even be preferable) for us to actually have WireMock be a first-class @Bean citizen within the Spring Context used by our tests. This way we could inject configuration properties into it like any other bean.
Hi, thanks for this project as it looks like it can make handling WireMock within Spring Boot tests much easier!
We have a somewhat different use-case: we use JUnit5 to write and run "blackbox integration-style" tests. We need to use a static well-defined port for WireMock but we allow overriding it via Spring Property. We'd like to be able to use an existing SpringBoot Property to configure the WireMock Port.
We looked into using a
WireMockConfigurationCustomizer
to set the port, but this doesn't get the Spring Context passed into it as far as we could tell.As a side note: The system under test runs in a different JVM, so our Spring Context only contains Test utilities. As such, it would not be a problem (it would even be preferable) for us to actually have WireMock be a first-class
@Bean
citizen within the Spring Context used by our tests. This way we could inject configuration properties into it like any other bean.