pholser / junit-quickcheck

Property-based testing, JUnit-style
MIT License
954 stars 121 forks source link

Plans to support JUnit 5 #139

Open charlesxucheng opened 7 years ago

charlesxucheng commented 7 years ago

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

pholser commented 7 years ago

@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 commented 7 years ago

@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 commented 5 years ago

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:

Any advice on the direction you reckon junit5 support should be taken would be very helpful.

pholser commented 5 years ago

@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 commented 5 years ago

@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 commented 3 years ago

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