You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now we figured that when a single test fails not the single test is re-executed, but the whole TestRunnerGsd at once. We've configured no class filters or the like, just enabled the plugin and set maxRetries to 3.
Is retrying Cucumber tests on a per-scenario level supported by this plugin?
The text was updated successfully, but these errors were encountered:
It does not support TestNG and might not fit your use-case, but if you just want individually retry-able cucumber tests, you might want to take a look at https://github.com/gradle/cucumber-companion.
I looked briefly into it. You are right; at the moment, all scenarios in the feature will be retried. This is caused by how TestNG executes and reports individual scenarios: https://github.com/prasanta-biswas/testng-cucumber/blob/master/src/main/java/cucumber/api/testng/AbstractTestNGCucumberTests.java#L25-L28. Basically, it uses scenarios as parameters for a data-driven test. So, TestNG runs a single method executing all scenarios. Currently, the plugin will retry the declared method including all of its iterations (i.e., all scenarios in case of TestNG).
I don't have a good recommendation at the moment apart from splitting large feature files into multiple. We have an issue to revisit Cucumber support on our roadmap, but there is no schedule for it yet: #279. We will check if we can provide a better support for the TestNG runner in that investigation.
We're using
cucumber-testng-7.8.1
together withtestng-7.6.1
and try to setup test retry with this Gradle plugin.This is one test class for a big set of tests that are largely divided by Cucumber tags:
Now we figured that when a single test fails not the single test is re-executed, but the whole
TestRunnerGsd
at once. We've configured no class filters or the like, just enabled the plugin and setmaxRetries
to 3.Is retrying Cucumber tests on a per-scenario level supported by this plugin?
The text was updated successfully, but these errors were encountered: