Skip to content
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

When using 'cucumber-junit-platform-engine' rerun files are not supported. How to rerun failed cases ? #2843

Closed
gorakshasabnis opened this issue Jan 5, 2024 · 3 comments

Comments

@gorakshasabnis
Copy link

In JUnit 4 failure cases were captured using 'rerun' like below:

@RunWith(Cucumber.class)
@CucumberOptions(
        plugin = {"pretty", "rerun:target/failed-scenarios/FailedCases.txt"},
        features = "src/test/resources/features"
)
public class TestRunner {}

Which can be run using below Junit4 runner


@RunWith(Cucumber.class)
@CucumberOptions(
            plugin = {"pretty"},
            features = "@target/failed-scenarios/FailedCases.txt"
)
public class TestReRunner {}

Q: However in JUnit5, 'FailedCases.txt' gets generated by mentioning rerun in 'PLUGIN_PROPERTY_NAME'. File gets generated too, but there is no way to execute that file.

Can someone please guide for re-running failed cases using Cucumber JUnit5 ?

@mpkorstanje
Copy link
Contributor

Duplicate of #2805

@mpkorstanje mpkorstanje marked this as a duplicate of #2805 Jan 5, 2024
@mpkorstanje mpkorstanje closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
@gorakshasabnis
Copy link
Author

@mpkorstanje is there is any different documention on how exactly to run this class along with '@ suite' ?

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jan 5, 2024

For Maven you could use the exec Maven plugin and bind it to the test phase. You would not use the suite in this case, you're programatically running JUnit.

https://www.mojohaus.org/exec-maven-plugin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants