-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New tests don't start until set of running tests are finished (serenity + junit5 + cucumber7) #3202
Comments
Have a look at https://github.com/serenity-dojo/swaglabs-serenity-cucumber for an example of parallel execution with Cucumber and Serenity BDD. |
What I see on this graph:
I expected behavior like on my second screenshot: As soon as test is finished new test should be started immediately without any delay cos it leads to significant time increasing. @wakaleo Was that how it was originally intended? Can I make the tests run like in my second screenshot? |
I really don't know, have a look in the code but the parallel execution is not managed by Serenity, it all happens at the Cucumber/JUnit level. All Serenity does is record the results and aggregate them at the end. |
But we don't have such issue if we use selenium instead of serenity |
I faced with the same issue. @wakaleo could you clarify how it works? According to this comment #3202 (comment) we should not se differences between selenium and serenity. However it is not true and parallel execution with serenity performs worse( |
@cliviu might have some thoughts, but feel free to investigate the code to see if you can propose any improvements. I have no idea how Cucumber handles the parallel execution, but the Serenity integration is in the SerenityReporterParallel class. There may be some syncing issue. @p-nikolaichik If you would like someone to investigate further, you are certainly welcome to get your company to obtain a commercial support contract so we can spend some time on this, or dig into the code yourself. |
Maybe you can have a look at the SerenityReporterParallel class, or maybe run your tests with a profiler to see if you can see any locking issues. |
SerenityReporterParallel is what provides the Serenity reporting and API support. What are you replacing SerenityReporterParallel with? |
This may be non-trivial.@p-nikolaichik if this feature is of value for your company, there is always the option of requesting commercial support. This would allow us to dedicate time to research the issue in depth, in particular in the context of your environment. Would you be up for this? |
@p-nikolaichik , how do you get those nice charts? |
👓 What did you see?
New tests don't start until set of running tests are finished. I start 1000 scenarios in 50 threads in parallel by scenarios and I noticed that time of execution is 4 hour (for comparison if I run the same suite of tests using jvm parallel plugin in parallel by feature files then total time is 1 hour). I built graphs and saw that new tests are not started even if previous are finished. It means that the threads are just idle waiting for the rest of the tests instead of starting new ones.
I created two the similar simple test projects for comparison. First with serenity, second with with poor selenium and web driver manager. Project with simple selenium doesn't have such issue. See following graphs.
✅ What did you expect to see?
If test is finished new test is started immediately without waiting for other tests finish
junit-platform.properties:
Environment:
Reproduced with Serenity 3.6.12/3.9.7, junit4/5, cucumber7, java 11/17
https://github.com/p-nikolaichik/serenity-cucumber-junit5
Serenity
Selenium with web driver manager
@wakaleo Maybe I missed some necessary config parameter to run tests in parallel?
The text was updated successfully, but these errors were encountered: