-
Notifications
You must be signed in to change notification settings - Fork 34
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
Parallel Jbehave Running Test #237
Comments
Parallel testing with Serenity in JBehave isn't supported due to constraints on the JBehave architecture. I would recommend migrating to Cucumber. |
@wakaleo we have a lot of stories 300+ and we want to slice it per batch :( ~12hrs to finish |
I would set up separate test runners for each batch and use failsafe to run the test runners in parallel. |
@wakaleo you mean I can define different runners in one command? e.g. |
No, you would just configure several JUnit classes with different configurations to run different subsets of the stories. It's not a JBehave-specific technique. |
@wakaleo is there a way to run the test runners on different jenkins nodes and merge the reports later ? To clarify, if I have separated the stories into different subsets using different runners, then I used failsafe to run the test runners in parallel, this will work on a single machine. I have looked at https://serenity-bdd.github.io/theserenitybook/latest/serenity-parallel-batches.html and focused on the cucumber section to run multiple batches and forks in the same time using jenkins. I am trying to do the same stuff using jbehave instead of cucumber (our current project is using Jbehave and it has a lot of stories). |
Yes, you can use tags, different runner classes, or batches to run a different subset of your tests on each node. Then you need to copy the target directory contents from each node into the same place and run mvn serenity:aggregate |
@wakaleo Thanks for the quick turnaround. So this means really that I have to take care of the slicing to different machines in the jenkins pipeline script to distribute the load and use the forking in failsafe (to boost the execution on every node) then I will merge back to single place and run mvn serenity:aggregate it would be nicer if it is supported like in cucumber :) Thanks Again. |
@wakaleo I have tried to use forking from failsafe plugin, however, it fails after execution with the current error:
After some research, the same issue is encountered in different projects (like cucumber) and it is related to some defect in surefire as per the issue here: cucumber/cucumber-jvm#960 I am not sure if it is the same issue that I am facing or not, but I am sure there is NO parenthesis in stories/scenarios. Any clue? P.S.
|
Removing the useless config:
Solved my problem! It seems JUnit uses different impl once it sees the classes config. |
@jayzsuarez Hi! I have exactly the same problem with parallelization of 600+ tests written on Serenity+JBehave+Selenium+Java8 . Dificulty is that each scenario is connected with specific credentials on the website, website has a restriction 1 active session per 1 creds. I tried to separate tests by tags of jbehave on 2 groups. |
@wakaleo tried to run in parallel using serenity and jbehave but still run in sequential manner. Already defined thread count and fork count in maven sure fire.
The text was updated successfully, but these errors were encountered: