updated base formatter to set a scenario as passed unless there exist…#582
Merged
updated base formatter to set a scenario as passed unless there exist…#582
Conversation
Go API Changes# summary Inferred base version: v0.13.0 Suggested version: v0.13.1 |
…s a failed step or all steps are undefined
2f6b096 to
542691e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
==========================================
- Coverage 82.94% 82.93% -0.01%
==========================================
Files 28 28
Lines 3412 3411 -1
==========================================
- Hits 2830 2829 -1
Misses 467 467
Partials 115 115
☔ View full report in Codecov by Sentry. |
Member
Author
|
@vearutop Is there anything I should update before you can approve this? |
Member
|
@roskee thank you for fixing this! |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
I have updated the step evaluation in the base formatter to not set a scenario as passed just because some step has passed. A scenario, after this change, will only be passed only if no steps exist that are
failed,pendingorundefinedin that scenario.⚡️ What's your motivation?
Issue #581 was created because of this. I was able to reproduce it easily. All I had to do was update the [api test feature] like the following (only updated the
method not allowedtomethod allowedThe summary for the above change is as follows

As it can be seen from the picture, the total scenarios (2) does not much the sum of passed (2) and failed (1) scenarios. This is due to the steps overriding the scenario status. That is, if a failed step is evaluated first, it will set the scenario as failed. but the next passing step will override that state and make it as passed. But when the summary is prepared the number of failed scenarios is evaluated as the number of failed steps (since a failed step will always lead to a failed scenario and other dependent steps are skipped, this logic works). This leads to the incorrect sum in the above result.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
I am not sure if this issue is only on the base formatter implementation. If there are any other implementations of the formatter I should look into, please let me know 🙏
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.