Generate Serenity aggregate report when tests are executed with cucumber-jvm-parallel-plugin

1.4k views Asked by At

Since Serenity, doesn't support parallel execution out of the box ,I'm using Cucumber jvm parallel plugin , after the tests are executed successfully I get the following files in my target/failsafe-reports directory:

failsafe-summary.xml
Parallel01IT.txt
Parallel02IT.txt
Parallel03IT.txt
TEST-Parallel01IT.xml
TEST-Parallel02IT.xml
TEST-Parallel03IT.xml

After I run mvn sernity:aggregate I get this:

[INFO] Generating test results for 0 tests
[INFO] 2 requirements loaded after 80 ms
[INFO] 2 related requirements found after 80 ms
[INFO] Generating test outcome reports: false
[INFO] Starting generating reports: 92 ms
[INFO] Configured report threads: 40
[INFO] Test results for 0 tests generated in 352 ms

For some reason the report aggregator does not seem to find the file locations. If I run the tests sequentially the report works just fine , even though the results are stored in the same directory.

If also tried setting the sourceDirectory in report plugin , but to no avail.

Is there some configuration options I am missing ? Or is it just plainly not possible to generate the report if I'm using the parallel plugin ?

1

There are 1 answers

0
Nicolai Baidan On

The actual runners generated by the plugin , did not use CucumberWithSerenity.

I've created a custom template based on https://github.com/temyers/cucumber-jvm-parallel-plugin/blob/master/src/main/resources/cucumber-junit-runner.java.vm and set the path to it with <customVmTemplate>src/test/resources/cucumber-custom-runner.vm</customVmTemplate> Afterwards the report is successfully generated.