gradle / test-retry-gradle-plugin

Gradle plugin to retry tests that have failed to mitigate test flakiness.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to get the retry number 1,2,3... during run time inside the gradle test task?

BugBuster123 opened this issue · comments

Currently I am using a cucumber framework for automation. I have been running the failed cases using the retry gradle plugin.
Please find the sample gradle task below

task failedtestrunner(type: Test) {
systemProperty("cucumber.plugin", "html:reports/$browser/${name}/cucumber.html")
include "**/FailedTestRunner.class"
testLogging.showStandardStreams = true
retry {
maxRetries = 5
failOnPassedAfterRetry = false
}
}

The problem that I am facing is when the task is rerun the reports folder gets overwritten every time. I will get only the result of the last run in the reports folder. If there is a way to get the retry number during run time I can append it to the reports folder (just like browser and task name given in the example above) and can get access to all the failed reports.