Closed murali4624 closed 5 years ago
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
I think I figured this out. Added the above plugin and those tests are skipped.
Following is my cucumber template java file.
import cucumber.api.CucumberOptions; //import cucumber.api.junit.Cucumber; import cucumber.api.testng.CucumberFeatureWrapper; import cucumber.api.testng.PickleEventWrapper; import cucumber.api.testng.TestNGCucumberRunner; //import org.junit.runner.RunWith; import org.testng.IRetryAnalyzer; import org.testng.ITestResult; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test;
//@RunWith(Cucumber.class) @CucumberOptions( glue = "com.fifa.stepdefs", features = {"target/parallel/features/[CUCABLE:FEATURE].feature"}, plugin = {"json:target/cucumber-report/[CUCABLE:RUNNER].json"} )
public class CucableJavaTemplate implements IRetryAnalyzer {
} When I run mvn clean verify, the following happens:
Scenario in feature files are broken into multiple scenarios and individual runners are generated and Tests are run.
But before the actual tests are run, cucumber-testng also tries to run '[CUCABLE:FEATURE].feature' and fails with error:
Configuring TestNG with: .org.apache.maven.surefire.testng.conf.TestNG652Configurator@725bef66 [Utils] [ERROR] [Error] java.lang.IllegalArgumentException: Not a file or directory: /projectpath/target/parallel/features/[CUCABLE:FEATURE].feature
How can I avoid running the '[CUCABLE:FEATURE].feature'?