Plans to support JUnit 5
Opened this issue · 6 comments
Hi. Is there any plans to support JUnit 5? I could not find any information related to JUnit 5 support in the documentation.
@charlesxucheng Once JUnit 5 goes GA, I plan to evaluate how best to accommodate JUnit 5.
In the meantime, 0.8 will have the ability to specify properties and the appropriate JUnit machinery as interface methods with default
implementations.
@charlesxucheng Also, if I understand the JUnit 5 docs correctly, JUnit 5 will be able to run JUnit 4-based tests unmodified using the JUnit Vintage engine.
Hi. I would be interested in helping out add native junit 5 support and I had a couple of questions to make sure I would be heading in the right direction:
Currently, junit-quickcheck-core
has two concerns, the generator and shrinking plumbing and the junit4 test runner. For native junit5 support either junit4 and junit5 could be configured as optional dependencies of core and add the junit5 equivalent to the test runner in the same module. Alternatively, junit4 specific parts could be split out into a junit-quickcheck-junit4
module and add junit5 stuff to junit-quickcheck-junit5
. The latter seems cleaner but has multiple problems:
- It would be a breaking 'API' change in terms of the dependencies, people upgrading would need to switch from depending on
junit-quickcheck-core
tojunit-quickcheck-junit4
- A number of tests for
junit-quickcheck-core
depend on the junit4 test runner and they aren't necessarily testing the junit4 test runner functionality. I could move them tosrc/test/java
in the newjunit-quickcheck-junit4
module but it would mean the tests aren't sitting nicely next to the code.
Any advice on the direction you reckon junit5 support should be taken would be very helpful.
@jhinch Thanks for your interest! I feel like jqwik has a lot of what I'd imagine doing with junit-quickcheck to integrate directly with API that JUnit 5 provides. I'd recommend looking that way for some inspiration. Other than that, I think the direction you'd outlined above looks promising.
@jhinch Also, if you have any questions regarding the implementation, feel free to contact me. I likely won't have much time to contribute, but I'd like to help however I'm able.
shouldn't that issue be closed since junit 5 has been released ?