We are using cucumber(with java) in our project for the automation(with mvn). I have a case where I need to execute one feature file, say feature_fil1 in the beginning of the suite.
Since all our features files are running in parallel(we are using the parallel execution), I can trigger this file only from the pom.xml. How can I invoke a feature file directly from pom.xml and then I would like to invoke other feature files(with the parallel execution).
I would appreciate any help on this.
Thanks.
Currently we are running this feature_fil1 manually and then invoking the cucumber automation suite(which runs all the feature files excluding this feature_fil1 parallelly). But trying to include this feature_fil1 as well in the automation, which I cant do in the parallel run, as there is not guarantee that it runs the feature_fil1 always in the first, before running the other files.So,thats why I am thinking to see if I can run it via pom.xml.
When using Cucumber with JUnit 5:
Define multiple @Suite
classes targeting a different group of features.
Each can be configured with it’s own level of parallelism through JUnit 5. Then configure Surefire to run these suites in order without parallelism.
- https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-junit-platform-engine
- https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder
When using Cucumber with JUnit 4:
Define multiple @RunWith
classes each targeting a different group of features.
Then configure multiple Surefire executions targeting a different class each.
- How to run two maven surefire plugins with different configurations?