Reputation: 4566
When a TestNG test fails I am retrying it once. If the retry is successful, then the build should be successful. If both the retry and the original test fail, the build should fail. The ignoreFailures option will ignore all failed tests and mark the build successful. I would like a more selective option. If such a feature doesn't exist, I can calculate in the afterSuite hook whether the suite was a success or failure; I would just need a way to manually mark the build as such.
Upvotes: 0
Views: 484
Reputation: 2609
You have to do it manually.
If your are using IRetryAnalyzer
it will mark all your failed tries as skipped. For gradle test report it would be looks like ignored tests and final build result is successful.
Suite state is private property, so changing is not be a good idea. Also it has only one option - hasFailures
.
Upvotes: 1