Parameters present in @SpringBootTest
missing in @ApplicationModuleTest
#890
Labels
in: test support
Spring Boot integration testing
meta: waiting for feedback
Waiting for feedback of the original reporter
type: improvement
Minor improvements
@SpringBootTest
(as of Spring Boot 3.4.0 M3) defines additional parameters not present in@ApplicationModuleTest
:properties
,useMainMethod
, andargs
. I especially missproperties
. For example, I use it to tell Flyway that it is okay to clean my database as part of the test lifecycle (spring.flyway.clean-disabled=true
). While there are alternative methods to inject additional properties into the environment, for example,@DynamicPropertySource
, the advantage of@SpringBootTest
is its ease of use and that it is in a place where the properties are easy to find.As an aside, I think it woul be great if
@SpringBootTest
and@ApplicationModuleTest
could be separated or a separate annotation would be introduced that I could slap onto a normal@SpringBootTest
or any other slice test. That would provide me the missing parameters of@SpringBootTest
and allow me to use Modulith's testing facilities in any slice test (like@JooqTest
).The text was updated successfully, but these errors were encountered: