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
To split tests to batches you need configure serenity run some tests and skip others. For different batches it will be different tests, below you can find short example of such configuration.
For configuration batches three parameters are used:
Optional parameter for choosing batch creating strategy. Possible values are DIVIDE_EQUALLY and DIVIDE_BY_TEST_COUNT. Default value is DIVIDE_EQUALLY. Instead of it can be used redundant thucydides.batch.strategy, but it strongly not recommended
This parameter should be the same for each batch, and should more
than 0. This is amount of all bathes for current sources, and synonym of
serenity.batch.count. Instead of it can be used redundant thucydides.batch.size, but it strongly not recommended
This parameter should be the same for each batch, and should more
than 0. This is amount of all bathes for current sources, and synonym of
serenity.batch.size. Instead of it can be used redundant thucydides.batch.count, but it strongly not recommended
This parameter should be different for each batch, and should be less or equal serenity.batch.size and more than 0. This is number of bath for execution in current build. Instead of it can be used redundant thucydides.batch.number, but it strongly not recommended
http://thucydides.info/docs/serenity-staging/#_running_serenity_tests_in_parallel_batches