Closed glibas closed 3 months ago
# summary Inferred base version: v0.13.0 Suggested version: v0.13.1
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
5a5631a
) 83.22% compared to head (4632c0a
) 83.21%.:exclamation: Current head 4632c0a differs from pull request most recent head 47145eb. Consider uploading reports for the commit 47145eb to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @roskee @vearutop could you please take a look
@glibas could you perhaps share an example to reproduce the problem so that we can test it as well. And also link the original issue #604 so that it will be closed once this pull request is done. Thanks :slightly_smiling_face:
Hi @roskee , The issue is well illustrated in this test cucumber.json output scenario_outline. The line of the step is being overwritten with the line of the example in Examples table, so all the steps within one scenario outline instance have the same line number causing report generators which are using cucumber.json output to display steps in random order, since they rely on the line number.
Hi @roskee, also as an example can be used this scenario Scenario: Support of Feature Plus Scenario Outline With Steps which can be executed before the change and after the change to observe changes in lines numbering
Hi @roskee apologies for chasing on this, would you be able to have a look?
Sorry for being late. I was very busy. I will take a look and let you know my thoughts.
No problem, thank you. In essence the change aligns godog cucumber json reporting behavior for scenario outlines with other cucumber implementations so hopefully should be straight forward.
Thank you @roskee for confirming!
🤔 What's changed?
Removing line overwrite from cucumber formatter
⚡️ What's your motivation?
The above code from cucumber/godog/fmt_cucumber.go overwrites the line property values of steps in cucumber reports (for Scenario Outlines only, regular Scenarios reports look good).
As a result, the step line property corresponds to the line in the Examples section rather than to the actual location of step within the feature file.
Due to the above, external tools that process the reports and use the line property for sorting the steps, display the steps out of order.
Other officially supported cucumber implementations (java, js, python, etc.) are generating reports correctly for Scenario Outline - line property corresponds to the actual location of step within the file rather than the line in Examples section.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.