serenity-bdd / serenity-cucumber-starter

A skeleton project for Serenity BDD and Cucumber JVM
Apache License 2.0
180 stars 285 forks source link

Reports are unavailable when the tests are executed in parallel using multiple JUnit classes #86

Open rakeshnambiar opened 2 years ago

rakeshnambiar commented 2 years ago

Reports are unavailable when the tests are executed in parallel using multiple JUnit classes. However, if I delete one of the JUnit classes and run the tests the report will be generated.

Please use the below sample to reproduce this issue. To run the tests, use the command mvn clean verify -P ui-tests -Dthreadcount=2.

https://github.com/rakeshnambiar/serenity-parallel-run-bug.git

In fact, I have the same issue for the sequential execution as well mvn clean verify -P ui-tests -Dthreadcount=1

wakaleo commented 2 years ago

Parallel execution via the maven plugins isn't supported by JUnit 5 - you need to use JUnit 4 for that.

rakeshnambiar commented 2 years ago

@wakaleo the actual issue here is the report generation and as mentioned above that is happening with a single thread when multiple Runner classes exists with different tags. I will still try with JUnit 4.

cb-rajeshkumar commented 1 year ago

@rakeshnambiar Replace the follow text in your test runner runner 1 : Replace : plugin = {"pretty"} with plugin = {"json:target/cucumber-parallel/1.json"},

runner 2 : Replace : plugin = {"pretty"} with plugin = {"json:target/cucumber-parallel/2.json"},