Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans to support JUnit 5 #139

Open
charlesxucheng opened this issue Dec 4, 2016 · 6 comments
Open

Plans to support JUnit 5 #139

charlesxucheng opened this issue Dec 4, 2016 · 6 comments

Comments

@charlesxucheng
Copy link

Hi. Is there any plans to support JUnit 5? I could not find any information related to JUnit 5 support in the documentation.

@pholser
Copy link
Owner

pholser commented Dec 4, 2016

@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.

@pholser
Copy link
Owner

pholser commented Jan 4, 2017

@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.

@jhinch
Copy link
Contributor

jhinch commented Feb 8, 2019

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 to junit-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 to src/test/java in the new junit-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.

@pholser
Copy link
Owner

pholser commented Feb 9, 2019

@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.

@pholser
Copy link
Owner

pholser commented Feb 14, 2019

@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.

@fduminy
Copy link

fduminy commented Mar 10, 2021

shouldn't that issue be closed since junit 5 has been released ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants