When I submit a single feature file it works perfectly. I want to pass features folder path which has multiple feature files into runner script. Can anyone help to execute multiple feature files?
All feature files have same steps but data is different and file name is different.
@RunWith(Cucumber.class)
@CucumberOptions(format = {"pretty"}, features =
"C:\\TESTER\\Execution\\uidata\\featurefiles\\",
glue={"com.test.auto.stepdefs"},dryRun=false)
public class CucumberTest {
}
I appreciate you help.
Cucumber can be executed in parallel using TestNG and Maven test execution plugins by setting the dataprovider parallel option to true. In TestNG the scenarios and rows in a scenario outline are executed in multiple threads. One can use either Maven Surefire or Failsafe plugin for executing the runners.
Cucumber can be executed in parallel using JUnit and Maven test execution plugins. In JUnit, the feature files are run in parallel rather than scenarios, which means all the scenarios in a feature file will be executed by the same thread. You can use either Maven Surefire or Failsafe plugin to execute the runner.
Run Cucumber tests with JUnitIn the Project tool window, right-click the package with step definitions and select New | Java Class. Name the new class (for example, RunCucumberTest ) and press Enter . In @CucumberOptions , specify the . feature file and the package with step definitions in your project (Glue).
The features path must be relative to your project classpath. For example it can look like this:
@CucumberOptions(features = {"classpath:features_folder1", "classpath:features_folder2"}, ...)
or
@CucumberOptions(features="src/test/resources")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With