-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[All] Use Jupiter Assertions over JUnit4 Assert #1935
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@mpkorstanje wrote myself a script yesterday to convert some work projects from JUnit4 to Jupiter; thought it couldn't hurt to run it on cucumber-jvm as well. Is it worth trying to make this work by changing the archetype dependencies to use jupiter? |
spring/src/test/java/io/cucumber/spring/contextcaching/SomeTest.java
Outdated
Show resolved
Hide resolved
Not yet. The archetype is used in our documentation as part of the 10-minute tutorial. The tutorial is aimed at extremely new developers. There is little very tolerance for platform and tooling related problems and tooling support for Junit Platform hasn't quite reached the point yet where I'd be comfortable changing that. Internally Surefire, Gradle assume the old class based execution model. This means that Cucumber works less then stellar with these integrations. So I'm currently waiting for a few issues to be resolved here:
With respect to IDEA, there is no good way to use the JUnit Platform to run individual scenarios and so I'm waiting for:
You may find some enjoyment in trying solve junit-team/junit5#2146. JUnit 5s code base has amazing quality. |
This should also picks up the Spring related |
Yes thanks; I had seen you star that repository a while back ; I adapted a bit from that yesterday, eventually ending up with: https://gist.github.com/timtebeek/51d0988397b9e9deac9a018d297e88d5 Some of it is a bit specific to the job, and it's not the cleanest code, but it gets the job done. |
Understandable; if I take out the archetype changes we're left with changes in deltaspike, an possibly some in spring/src/test/java/io/cucumber/spring/contextcaching/SomeTest.java which doesn't yet use the new Diving into JUnit5 might seem fun, but not sure if I'll find the time easily; also, the package access challenge posed in the issue you raised does not seem to have a clear resolve yet. I'll explore if I find time. :) |
Sure every bit helps! |
@mpkorstanje Deltaspike changes ready for review/merge now then. :) |
Cheers! I fixed up spring too. |
Summary
Use Jupiter Assertions over JUnit4 Assert. In particular deltaspike seems to have had a few old style Asserts. Jupiter should be preferred where possible, unless we're verifying compatibility such as in the junit module.
Types of changes
Checklist: