buck icon indicating copy to clipboard operation
buck copied to clipboard

JUnit 5 support?

Open alekseikurnosenko opened this issue 7 years ago • 3 comments

Are there any plans to support JUnit 5? Stable version was released this year - https://github.com/junit-team/junit5

alekseikurnosenko avatar Aug 20 '18 15:08 alekseikurnosenko

Yes, it is on my wishlist too. But not any time soon. We are probably looking next year or later.

bobyangyf avatar Aug 20 '18 20:08 bobyangyf

@bobyangyf What about using the JUnit 5 Vintage artifact? Using JUnit 5 Vintage would allow us to run vintage JUnit tests (tests written in the JUnit 4 style) on the new JUnit Platform. Therefore we would not need to upgrade JUnit 4 tests itself yet.

See https://www.baeldung.com/junit-5-migration:

JUnit Vintage aids in the migration of JUnit tests by running JUnit 3 or JUnit 4 tests within the JUnit 5 context.

Also https://junit.org/junit5/docs/current/user-guide/#dependency-metadata-junit-vintage

JUnit Vintage test engine implementation that allows to run vintage JUnit tests, i.e. tests written in the JUnit 3 or JUnit 4 style, on the new JUnit Platform.

JUnit 5 releases: https://github.com/junit-team/junit5/releases

mkurz avatar Nov 09 '18 09:11 mkurz

That sounds like a potentially good solution. We will still have to look into our test runners and test selection logic and I'm not sure we have the resources at the current time to get to it.

bobyangyf avatar Nov 09 '18 22:11 bobyangyf