cucumber-reporting
cucumber-reporting copied to clipboard
remove duplicate scenarios from the same cucumber.json file caused due to retry mechanism
when the failed scenario will be retried immediately after the failure during execution, This results in the json entry twice in the same cucumber.json file.
If the scenario, runs successfully after retry, cucumber reports show error once and successful once. but the overall status of the feature will be failure.
Can you clarify the problem again?
I am using retryAnalyzer of testNG for retry mechanism (So the retry happens just after the scenario is failed but not at the end of the test execution). Because of this, if the scenario is failed for the first time and succeeds the second time, this is reported in the same cucumber.json file.
When I check, I see the the same id for both the executions. I tried MergeWithId option but it did not effect as it compares the scenario's with same id from different cucumber.json files.
I think this is similar to https://github.com/damianszczepanik/cucumber-reporting/pull/914
Will this feature be added to plugin?
https://github.com/damianszczepanik/cucumber-reporting/blob/master/src/main/java/net/masterthought/cucumber/reducers/ReducingMethod.java#L64 does it look like the solution?
I have tried this but it does not work in this scenario
Then I don't think I can help you
Hi Team, is there any fix for the ^ issue ?
I had some issues that are related to this thread, using report generation through the maven plugin, what I found was that I had duplicate results in the final report because of the MergeFeatures flag, which was true on the plugin. In ReportFeatureMergerFactory you can see that the order of mergers are merge features first, then merge rerun scenarios, due to this order if you have the flag for merge features you will always get duplicate results in the end report. make sure that you don't have the MergeFeatures enabled, or remove the ReducingMethod.MERGE_FEATURES_BY_ID;
A solution to this would be to invert the order of processing the reducing methods.
Would you like to prepare PR for that ?