-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[JUnit Platform Engine] Improve Maven and Gradle compatibility #2832
Merged
mpkorstanje
merged 4 commits into
main
from
junit-platform-use-test-engine-class-source
Dec 14, 2023
Merged
[JUnit Platform Engine] Improve Maven and Gradle compatibility #2832
mpkorstanje
merged 4 commits into
main
from
junit-platform-use-test-engine-class-source
Dec 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2832 +/- ##
============================================
+ Coverage 84.97% 84.99% +0.01%
- Complexity 2728 2732 +4
============================================
Files 331 331
Lines 9545 9554 +9
Branches 917 918 +1
============================================
+ Hits 8111 8120 +9
Misses 1109 1109
Partials 325 325 ☔ View full report in Codecov by Sentry. |
mpkorstanje
force-pushed
the
junit-platform-use-test-engine-class-source
branch
from
December 13, 2023 00:32
c7891c0
to
dc77290
Compare
Maven Surefire and Gradle do not (yet?) fully support the JUnit Platform API[1]. To work around this problem the `cucumber.features` can be used. However, because Maven Surefire and Gradle only attempt to discover class based tests, they do expect a class source. As a result of this missing source, Maven Surefire will not report on the executed tests while Gradle reports the tests as having been executed by an "Unknown Class". By having the Cucumber TestEngine pretend to have a ClassSource when `cucumber.features` is used both these problems go away. 1. #2498
mpkorstanje
force-pushed
the
junit-platform-use-test-engine-class-source
branch
from
December 13, 2023 00:37
dc77290
to
5c5a19c
Compare
mlvandijk
reviewed
Dec 13, 2023
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.
Small suggestions on the text.
cucumber-junit-platform-engine/src/main/java/io/cucumber/junit/platform/engine/Constants.java
Outdated
Show resolved
Hide resolved
cucumber-junit-platform-engine/src/main/java/io/cucumber/junit/platform/engine/Constants.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Marit van Dijk <[email protected]>
…/platform/engine/Constants.java Co-authored-by: Marit van Dijk <[email protected]>
mlvandijk
reviewed
Dec 13, 2023
...unit-platform-engine/src/main/java/io/cucumber/junit/platform/engine/CucumberTestEngine.java
Show resolved
Hide resolved
Thanks Marit! |
mpkorstanje
added a commit
to cucumber/cucumber-java-skeleton
that referenced
this pull request
Apr 15, 2024
With cucumber/cucumber-jvm#2832 there is no need for the pretty plugin anymore. The cucumber engine will pretend to be a class and Maven can then report on it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
Maven Surefire and Gradle do not (yet?) fully support the JUnit Platform API[1]. To work around this problem the
cucumber.features
can be used.However, because Maven Surefire and Gradle only attempt to discover class based tests, they do expect a class source. As a result of this missing source, Maven Surefire will not report on the executed tests while Gradle reports the tests as having been executed by an "Unknown Class".
By having the Cucumber TestEngine pretend to have a ClassSource when
cucumber.features
is used both these problems go away.🏷️ What kind of change is this?
📋 Checklist: