-
-
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
cucumber junit5 engine doesn't support tests rerun #2805
Comments
is there any way to rerun failed tests with junit5? |
To rerun failed scenarios please review https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-junit-platform-engine#rerunning-failed-scenarios. |
While it would be possible to implement a JUnit Engine that executes Additionally JUnit 5 somewhat implicitly expects that test execution does not change the tests that could be discovered. While it may be possible with the current state of Surefire and Gradle to ignore that, it could cause all sorts of janky behavior when the JUnit API is used as intended. More jank than I'm willing to accommodate for. If this is a major impediment to you, I reckon that you or your company can either petition Gradle and/or Surefire for better JUnit 5 support or materially contribute to that support in some way. Alternatively, if some one is able to convince the JUnit 5 team to accept a PR that makes it possible order test engines and and willing to commit to dealing with all the jank that comes from implementing |
Potentially implementing That does leave the test engine ordering problem. |
And the ordering problem could be solved by having multiple surefire executions. One for the run and a second for the rerun. Each targeting different suites. Still janky, but better than nothing. |
Just passing by see if there are any advances on this issue. |
No, unfortunately the best way to rerun tests and preserve reports written by Cucumber is still to use the JUnit Platform Launcher with different configurations for the run and rerun. As you are interested in seeing this resolved, would you be interested in contributing a solution? |
I use cucumber with gradle and run tests with next configuration in build.gradle
Everting work fine when I just run tests. But if I get "build/site/failed_scenarios.txt" file with failed tests and try to rerun only failed tests with
systemProperty("cucumber.features", "@build/site/failed_scenarios.txt")
I get an error
with junit4 I used
The text was updated successfully, but these errors were encountered: