Open sudarsunperu opened 2 years ago
Try without batches.
Hi @wakaleo , yes without batches it works fine. But my project has 350 + test cases, and we use batching for parallel execution.
Currently it uses the below versions and Batching works fine when maintaining each Scenario in a separate file.
I'm trying to update the versions to the latest without breaking my pipeline for parallel execution using Batching.
slf4jVersion = '1.7.7'
serenityCoreVersion = '2.0.41'
serenityCucumberVersion = '1.9.31'
serenityRestAssuredVersion = '2.0.40'
junitVersion='4.12'
assertJVersion='3.8.0'
logbackVersion='1.2.3'
webDriverManagerVersion='4.1.0'
The batch handling is community-driven, so you may have to dig into the code to see what it is doing.
Why don't you just run the features in parallel using the Cucumber support for parallel execution?
Thanks @wakaleo , I will try to look into the Code and Provide a PR. Alternately, I will also look into parallel execution using Cucumber for gradle.
Because of OOM exceptions when running 350+ tests in the same machine, we used batching and executed each batch in a separate node. However I'm not sure if the same is possible using Cucumber parallel execution
I just wanted to add I have also encountered this exact issue and it also does the same sort of thing if the name of the features file are the same but in different folders within the cucumber feature source . For example ./folder1/purchases.feature and ./folder2/purchases.feature would cause both of them to be looked for in both batch slices and then it will fail because it can't find the name in the feature slice it was given (because its not actually there) .
HI @sudarsunperu , Any progress on this , Did you able to run tests in batches with upgrading to newer version of serenity and cucumber ?
This isn't supported, feature names must be unique. Batches are probably also made redundant by Cucumber 7 parallel execution.
Hi Team, If I put Scenarios belonging to the same Feature in separate files, then the batch execution fails. I tested this behaviour for serenity-core from
2.4.24
and3.1.5
and its the same.e.g.: Say there are two feature files
Sceanrio1.feature
andScenario2.feature
.Scenario1.feature
Scenario2.feature
when I execute it I get the error as stated in the below details.
The error log
Observe that #2 gets appended to the feature name
java.lang.IllegalArgumentException: Can't find feature 'Searching for a term #2' in this slice
However if I put both the scenarios in a single file
Scenarios.feature
the batching and execution works perfectly fine.For maintainability and reporting purpose, my project maintains each Scenario in a separate
.feature
file and all Scenarios of the same feature are kept in a directory.Please suggest to fix this batching issue when maintaining scenarios of same feature in a differnet files.