Recently I created a framework with Cucumber-JUnit where I am able to execute Scenarios in parallel (For now keeping one scenario per feature) without any issue.
Now I have a situation where some of the features has to run in parallel and some in sequence.
Is there any way that we can control with tags or any other configuration to choose which has to run in parallel or sequence?
Let me put some overview how it is currently
Parallel and its thread size controlled as per cucumber official documentation - Maven surefire
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<parallel>methods</parallel>
<threadCount>${threadSize}</threadCount>
<perCoreThreadCount>false</perCoreThreadCount>
</configuration>
</plugin>
CucumberRunner:
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/test/resources/features"},
glue = {"com.tests.binding.steps"},
tags = "@regression"
)
public class RunCucumberFeatures {
}
command using to run tests
mvn clean test -Dcucumber.filter.tags="${toExecute} and not (@smoke)" -DthreadCount=${ThreadSize} -Dcucumber.execution.dry-run="false"
For toExecute
parameter - we pass multiple tags like @customerClaim or @employeeClaim
Now, In my case features with tags @employeeClaim should execute in parallel and tags with @customerClaim should execute in sequence.
Is it possible with current design or any other way?