I use cucumber for testing ui written in java. I am trying to implement a cucumber plugin to restart failed scripts and created a second runner class for these scripts:
first grade
@RunWith(Cucumber.class) @CucumberOptions( monochrome = true, strict = true, tags = {"@lakeisha"}, features = ".", format = {"html:target/cucumber", "json:target/cucumber.json"}, plugin = { "pretty", "html:target/cucumber-reports", "json:target/cucumber.json", "rerun:src/test/resources/rerun.txt" //Creates a text file with failed scenarios }) public class RunCukeTestsIT extends BaseCucumberRunner { }
second class:
@RunWith(Cucumber.class) @CucumberOptions( monochrome = true, tags = {"@lakeisha"}, features = "@src/test/resources/rerun.txt", //Cucumber picks the failed scenarios from this file format = {"html:target/cucumber", "json:target/cucumber.json"} ) public class ReRunCukeTestsIT extends BaseCucumberRunner{ }
and I run tests using
mvn clean verify -Dcucumber.options=" --tags @lakeisha"
the problem is that running it through the terminal does not create anything in the rerun.txt file, but it is done through IJ. I also tried putting the plugin in part of the Dcucumber.options command, but to no avail. Help rate!
source share