flyway / flyway-test-extensions

Apache License 2.0
129 stars 35 forks source link

Add support for JUnit 5 #43

Closed eddumelendez closed 6 years ago

eddumelendez commented 7 years ago

http://junit.org/junit5/docs/current/user-guide/#extensions

FlorianGWE commented 7 years ago

JUnit 5 is out so we should think about how we could integrate Flyway Test extensions in it. One problem could be the Spring setup of the Flyway stuff.

JorgenRingen commented 6 years ago

Any updates or roadmap for this? Are there any workarounds for JUnit5?

FlorianGWE commented 6 years ago

Hi Jørgen, At the moment no update or plan. Hope at the end of November I have time for flyway-test-extension. If you have a test run with exception of spring with Junit5 it will be welcome. I think a Junit5 only setup will be much effort.

Florian

FlorianGWE commented 6 years ago

Please take a look in the Spring5JunitTest in the example project flyway-test-junit5. It show how the annotation FlywayDb can be used with Junit5 and Spring5. Note: BeforeAll is currently not implemented.

At the moment I think about how to implement a FlywayTestExtension as a Junit5 extension.

FlorianGWE commented 6 years ago

I add a save load implementation for Junit5 environment without any Junit4 class.

@JorgenRingen can you clone the repostory and make a test with 4.2.1-SNAPSHOT if the current implementation is all you currently need for your environment.

JorgenRingen commented 6 years ago

I can confirm that 4.2.1-SNAPSHOT of flyway-spring5-test works for my usecase/environment. Thanks a lot! :-)

FlorianGWE commented 6 years ago

New Release 4.2.0.2 contains Junit 5 support.