-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add support for JUnit5 #256
Comments
Would be. Feel free to provide a patch. :) |
I started to see if I can do it (instead of opening an issue) but I've been blocked almost immediately with the ant part of the project. Some Java9 issues I guess... I might look at it indeed. :) |
To be honest I haven't had the need to use JUnit5, so my knowledge of it is very limited. I know they've changed the internals a lot, so it may be time-consuming refactoring. If there is not clear benefit I don't think I'll invest my time in doing this... there's just not enough of it anymore. |
I can totally understand. That's what makes open source so funny: DIY! :p |
@dweiss Correct me if I'm wrong but the maven plugin "just" delegates to the ant one. |
I'm also interested in an update. JUnit 5 is a big step. Randomized testing in JUnit5 might look like this https://github.com/qala-io/datagen/tree/master/junit5 Because I'm not interested in Maven or Ant, a pure Gradle solution is a viable alternative to me. Gradle 4.6 will support JUnit5 gradle/gradle#828 (comment) There is a first step gradle/gradle#4116 Ordering sequence of tests might be important junit-team/junit5#13 (comment) was considered for JUnit 5.1 which was released yesterday https://github.com/junit-team/junit5/releases/tag/r5.1.0 but issue is still open. Parallelized executions is another issue which is not settled in JUnit 5 junit-team/junit5#60 but would be very interesting |
I'm also approaching this from the Gradle perspective. The only way I see to make the randomized testing Gradle plugin work past Gradle 6 is to use |
I honestly don't know, haven't touched JUnit5 yet. |
I am using JUnit 5 and am sorely missing randomized testing. |
You're correct - I don't think it's a small task, especially if you wanted to fit into JUnit5's new architecture more nicely... For now, I'm happy working with JUnit4 so there's no real itch to upgrade (and rewrite thousands of tests)... |
Do you even think it is possible without starting from scratch ? |
It depends on the direction, really. Most people think of JUnit5 in terms of Jupiter - the default TestEngine implementation. You could (easily?) port randomizedtesting's runner as a separate TestEngine but then none of jupiter's extensions would work, which is not much different than running JUnit5 tests with the vintage TestEngine... A more ambitious plan would be to try to hack into jupiter to simulate what the custom runner currently does (primarily deterministic randomized context/seed providers for tests, hooks, etc., then thread leak detection and listeners, perhaps). Last time I did some initial experiments [1], I couldn't make it work but I'm sure a lot has changed since then. I think it'd be a fun project if you decide to spend some time on it. It's self-contained, which makes it even nicer. You can copy/paste or reuse whatever you need but you also don't have to - it's not about the implementation, it's about the functionality it has to offer. I'd start with the order in which the examples [2] are laid out - I tried to make it progress from easier/ more fundamental features to more esoteric ones. [1] https://github.com/randomizedtesting/randomizedtesting/commits/junit5/ |
Would be nice to add support for JUnit5.
The text was updated successfully, but these errors were encountered: