Reports are unavailable when the tests are executed in parallel using multiple JUnit classes
rakeshnambiar opened this issue · 3 comments
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
Parallel execution via the maven plugins isn't supported by JUnit 5 - you need to use JUnit 4 for that.
@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.
@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"},