Open mpkorstanje opened 2 years ago
You're right. Most support in 3rd-party tools is Jupiter-centric.
I know at least of one additional Maven plugin that tries to treat each test engine alike. ;-)
Some additional context on why I believe support for all discovery selectors is important.
A typical use case is to run a single test. For example:
mvn test -Dtest=MyExampleTest
Which is effectively the same as using a DiscoverySelectors.selectClass(MyExampleTest.class)
. However for the IDEs and tools listed above this is also the only supported selector.
Ideally this would be:
mvn test -Dselect-class=MyExampleTest
mvn test -Dselect-file=path/to/example.file
Currently users of Cucumber who use the junit platform are running into this problem. And as such I'm considering adding functionality in https://github.com/cucumber/cucumber-jvm/pull/2498 that makes it possible to do:
mvn test -Dcucumber.features=path/to/example.feature
but this pretty much nullifies the advantage of having the JUnit Platform create the discovery request.
You're right. Most support in 3rd-party tools is Jupiter-centric.
It's almost as if everyone ignored the "What is JUnit 5?" section of the user guide and reused the support code from JUnit 4. :rofl:
I know at least of one additional Maven plugin that tries to treat each test engine alike. ;-)
Neat!
Looking forward to seeing JUnit5 first class support for Cucumber
@orcunbalcilar support for Cucumber from JUnit 5 is really good. Unfortunately IDEA, Gradle and Maven do not provide first class support for JUnit 5.
Ah sorry, I misunderstood it. Thanks.
The use of the term "first-class" in this context refers to the fact that IDEs and build tools provide "built-in" support for the JUnit Platform based on APIs and SPIs defined by the JUnit Platform rather than support being provided by some third party or JUnit itself (like the old JUnitPlatform
Runner
).
Though, the support is not always "complete".
Thus, I have changed the title of this issue to reflect that.
We could also consider updating the wording in the User Guide to be a bit more transparent about the status quo.
Currently the user-guide states:
However of these I know that:
IDEA
Eclipse
Maven Surefire
Gradle
do not support the use of all discovery selector primitives (either directly or indirectly) and don't fully use the hierarchal test concept (often limited to the extent needed to support JUnit 4). As such I don't believe we can claim these IDEs and build tools have first-class support for the JUnit Platform. At best I believe we may claim some support for JUnit Jupiter.