Open swapy opened 1 year ago
JUnit5 should be supported out of the box, including the @RepeatedTest
annotation. All testing frameworks supported by Spring are also supported by this library. I could update the code examples from JUnit4 to JUnit5, but I don't find it particularly important. Or would you suggest any other changes to the documentation?
I would suggest adding one more section mentioning example on how to use with Junit5
example, now I have to go with SpringExtension and it works
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("pgsqltest")
@ExtendWith(SpringExtension.class)
@AutoConfigureMockMvc
@AutoConfigureCache
@AutoConfigureEmbeddedDatabase(refresh = AFTER_EACH_TEST_METHOD, provider = AutoConfigureEmbeddedDatabase.DatabaseProvider.ZONKY, type = AutoConfigureEmbeddedDatabase.DatabaseType.POSTGRES)
@TestPropertySource(properties = {"spring.config.location=classpath:application-pgsqltest.yml"})
class PersonTestIT {
...
}
Thank you very much @tomix26 for this wonderful project. All efforts appreciated.
I would like to suggest an improvement for docs. Can we mention more about Junit 5 support in documentation?
@RepeatedTest
Thanks.