Closed sapan-kumar closed 6 years ago
When I run my cucumber test case for a single tag e.g.
mvn clean verify -Dcucumber.options="--tags @abc"
and my runner class looks like
@RunWith(Cucumber.class) public class RunCukesTest {
@AfterClass public static void teardown() { try { Reporter.loadXMLConfig(new File("src/test/resources/extent-config.xml")); Reporter.setSystemInfo("user", System.getProperty("user.name")); Reporter.setSystemInfo("os", "Win"); Reporter.setTestRunnerOutput("Sample test runner output message"); } catch (Exception exp) { exp.printStackTrace(); } }
}
Note: There is no error when I remove the @abc from the feature file and I simply run mvn clean verify
the situation comes only when I try to run specific test case with @tag
Was not providing enough options in the -Dcucumber.options.
When I run my cucumber test case for a single tag e.g.
mvn clean verify -Dcucumber.options="--tags @abc"
and my runner class looks like
@RunWith(Cucumber.class) public class RunCukesTest {
}
Note: There is no error when I remove the @abc from the feature file and I simply run mvn clean verify
the situation comes only when I try to run specific test case with @tag