I am using Maven SureFire, TestNG (extending AbstractTestNGCucumberTests) and Cucumber and have several feature files which each have several scenarios. I want to be able to run each scenario in a feature file in parallel but only one feature file at a time. Is this possible?
So to give an example:
Feature file 1
Scenario 1a
Scenario 1b
Scenario 1c
Feature file 2
Scenario 2a
Scenario 2b
Feature file 3
Scenario 3a
Scenario 3b
Scenario 3c
Scenario 3d
I want Scenarios 1a, 1b and 1c to run in parallel in feature file 1. Once those are complete run Scenarios 2a and 2b from feature 2 etc.
This is the test class that runs all scenarios from all features files at once currently.
@CucumberOptions (
plugin = {
"html:target/cucumber-reports",
"json:target/cucumber.json",
"usage:target/cucumber-usage.json"
},
tags = "not @disabled",
monochrome = true,
features = {
"src/test/resources/features/feature1.feature",
"src/test/resources/features/feature2.feature",
"src/test/resources/features/feature3.feature",
})
public class AllTests extends AbstractTestNGCucumberTests {
@Override
@DataProvider(parallel = true)
public Object[][] scenarios() {
return super.scenarios();
}
}
Is this possible using configuration
Thanks, Scott.