on-internet
← Community

Automatically re-run failed only scenario in cucumber java+testng

Stack Overflow ·

How can I make only failed scenarios to be run again automatically on failure ? Here is some clue on what I am doing: Pass TestRunner class from command line through cucumber-testng.xml file at run-time. I am able to see rerun.txt file after scenario failed, with feature/GM/TK/payment.feature:71 (pointing to failed scenario) but failed scenario is not automatically re-run. The "TestRunner" java file @RunWith(Cucumber.class) @CucumberOptions(strict = true, features = { "src/test/resources/" }, //feature file location glue = { "com/test/stepdefs", "com.test.cucumber.hooks" }, //hooks and stepdef

Comments

Sign in or sign up to comment and upvote.

No comments yet.