-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[JUnit Platform] Use EngineDiscoveryRequestResolver #2835
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2835 +/- ##
============================================
+ Coverage 84.80% 84.86% +0.06%
+ Complexity 2728 2719 -9
============================================
Files 331 334 +3
Lines 9428 9569 +141
Branches 902 932 +30
============================================
+ Hits 7995 8121 +126
- Misses 1111 1118 +7
- Partials 322 330 +8 ☔ View full report in Codecov by Sentry. |
29ff69e
to
bd9ac67
Compare
The current implementation of the JUnit Platform Engine treats Cucumbers documentation consistently uses This will become a problem if/when we start to use the |
"\n" + | ||
"This is a work around for the limited JUnit 5 support in Maven and Gradle. " + | ||
"Please request/upvote/sponsor/ect better support for JUnit 5 discovery selectors. " + | ||
"For details see: https://github.com/cucumber/cucumber-jvm/pull/2498\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be interesting for you (if/when it gets merged):
gradle/gradle#29535
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this being used here now! 👍
🤔 What's changed?
Cucumber now uses JUnits
EngineDiscoveryRequestResolver
. JUnit provides aEngineDiscoveryRequestResolver
that handles the resolution of most resources. This removes some complexity from Cucumber. This comes with several implications.Classpath resources must be singular feature files.
There is now a distinction between the classpath resource and package discovery selectors. The former should be used for individual feature files on the classpath, the latter for directories.
So instead of using a class path resource selector for a directory:
The package selector should be used instead:
This is still okay:
Using the classpath resource selector on a folder does still work, but the functionality has been deprecated will result in a warning.
Support
cucumber.execution.order
Features and scenarios are now discovered in arbitrary order and ordered after discovery. This order can be controlled with the
cucumber.execution.order
property. By default features are executed inlexical
uri order, with scenarios and examples from top to bottom. Other valid options arereverse
andrandom
.There is room to add custom orderer here but this hasn't been implemented yet.
Use JUnits discovery issue reporting mechanism
Any problems with the build are now reported through JUnits discovery issue reporting mechanism. This provides a more robust report than logging warnings.
⚡️ What's your motivation?
DiscoveryIssue
-reporting mechanism #2987🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist: