I'm new to Serenity and BDD. I've a small demo project based on Serenity-Cucumber and Page Based model. Below is the structure of the project:
The Login and Logout features have around 8 scenarios.
I want to be able to run the feature files in parallel. What is the easiest and most effective way to achieve this?
So far I have
Created separate Runner class for each feature and then used failsafe or surefire plugin - This is something I don't want as I don't want a new runner for each feature file.
Used the "cucumber-vm-parallel-plugin". I copy pasted below code in my pom file. Nothing happened.
<plugin> <groupId>com.github.temyers</groupId> <artifactId>cucumber-jvm-parallel-plugin</artifactId> <version>1.0.1</version> <executions> <execution> <id>generateRunners</id> <phase>validate</phase> <goals> <goal>generateRunners</goal> </goals> <configuration> <glue>com.automationrhapsody.cucumber.parallel.tests</glue> <featuresDirectory>src/test/resources/com</featuresDirectory> <cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir> <format>json,html</format> <tags>"~@ignored"</tags> </configuration> </execution> </executions>
Looked into Serenity documentation and ran my program using following parameters, but could not achieve parallel execution.
mvn verify -Dthucydides.batch.count=2 -Dthucydides.batch.number=2
I'm stuck over here. Any help (easy and effective) will be appreciated. Also, please suggest how options 2 and 3 above can be done correctly
Thanks.
You also need to add below plugin.