I want to automatically retry failed tests to improve the reliability of my tests similar to the TestRule found within Junit I want the flexibility to insert logic around the tests so I can implement a retry loop:
I’m using Cucumber-JVM and need a solution involving Java or Gradle
I have tried the following cucumber options via Gradle javaexec:
//--format pretty --format rerun --out tmp/rerun.txt
//--format rerun --out C:\Desktop\failed.txt
Currently I am in the process of trying this via the RunCukesTest.java.
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
/**
* String dotcucumber
boolean dryRun
String[] features
String[] format
String[] glue
boolean monochrome
String[] name
Specify a patternfilter for features or scenarios
SnippetType snippets
boolean strict
String[] tags
*
*/
@RunWith(Cucumber.class)
@CucumberOptions(monochrome = true)
public class RunCukesTest {
}