Rerun.txt cucumber - borzykin/wiki GitHub Wiki

Add rerun:target plugin to plugins:

    plugin = {"pretty", "html:target/cucumber-report/cucumber.html",
        "json:target/cucumber-report/cucumber.json",
        "junit:target/cucumber-report/cucumber.xml",
        "rerun:target/rerun.txt"})

Add new runner for rerun.txt

@RunWith(CucumberCustomRunner.class)
@CucumberOptions(
    strict = true,
    monochrome = true,
    features = "@target/rerun.txt",
    plugin = {"pretty", "html:target/cucumber-report/cucumber.html",
        "json:target/cucumber-report/cucumber.json",
        "junit:target/cucumber-report/cucumber.xml"})
@Log4j
public class CiRerunAndroid {

Run 2 jobs with additional params:
mvn clean test with -Dcucumber.options="-p rerun:target/rerun.txt classpath:features"
and then mvn test with -Dcucumber.options="@target/rerun.txt"