-
Notifications
You must be signed in to change notification settings - Fork 1
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
Result with same feature in input concatenates instead of merging #6
Comments
This is exactly what I see as well. What we have seen from the Cucumber report Jenkins plugin (https://github.com/damianszczepanik/cucumber-reporting) is that the built-in merge manages to merge these based on id (here: "m125"). From our point of view, the ideal result would be that both "Scenarios" would be children of the common feature "Order States". |
the current merge is very basic: its purpose is to merge cucumber.json reports by some tools that generate these, one per each feature. |
@gpucciani how do you run your scenario outlines so that each example runs in a different host? do you have a sample project code you can share? |
Maybe I can shed some light on this. Boozang has a built-in dispatcher that can support multiple workers (in this case Docker containers running Puppeteer and Xvfb). The dispatcher supports dividing up the scenario iterations between different workers in the "Scenario Outline" to guarantee even workload. I have attached two reports generated from two different workers running two different scenario iterations within the same "Scenario Outline". The ideal case would be to be able to merge these so that XRay will display them together. report_cucumber-m125-t1-0.json.txt |
Note: in cucumber (ruby and JVM), multiple elements related to the examples have a dynamic id such as:
therefore it seems that thesse id's are not being used as cucumber official tools do, which is an additional challenge. |
If I understand it correctly the key is to have dynamic id:s for the different data iterations in the Scenario outline. We can totally do this - in fact we have full control over the format of the Cucumber reports. Do you think you can find an example using two different feature files containing scenarios from the same scenario outline that can be successfully merged into one? If so, we can simply follow that example format and make it work that way. |
@bitcoder Is it possible to have such an example as mentioned by @ljunggren ? |
Hi, |
Hi Sergio, We've created an experimental fork on cucumber-json-merge that supports this case. https://github.com/ljunggren/cucumber-json-merge-multiworker I hope that is ok by you! It's still experimental so not sure how well it works yet. Let us know if something doesn't look right to you Best Regards, |
Hi @ljunggren ,
Regards |
Hi Sérgio, Great! As you say, we are not yet sure it deals with all scenarios you describe. Let us confirm that it works for the case we have seen in TCS, and take it from there. As soon as it's confirmed I think the best approach would be to add the "merge scenarios" you describe to "test/fixtures" in your repo. That way I can make sure it works for those scenarios and create unit tests for it, then you can merge it back when you feel confident it works. Best Regards, |
Hello,
We have an issue when aggregating results of scenarios that run in parallel.
In our example (attached screenshots) we used two json with the same feature, and we would expect the script to do an "intelligent" merge. That would result in a json with only one feature. It seems however that the script concatenates only the two files.
Are we doing something wrong? Can you please clarify a bit more the type of merge we can expect and if there are some requirements on the input files?
I see that in "cucumber-json-merge/test/fixtures/" files 1 and 2 are related to different features.
Thank you!
result
file1:
file2:
Thanks a lot for your help!
The text was updated successfully, but these errors were encountered: