-
Notifications
You must be signed in to change notification settings - Fork 144
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
feat: skip
support at step level
#592
Conversation
Signed-off-by: GitHub <noreply@github.com>
@@ -302,24 +302,31 @@ func (v *Venom) runTestSteps(ctx context.Context, tc *TestCase, tsIn *TestStepRe | |||
printStepName := v.Verbose >= 1 && !fromUserExecutor | |||
v.setTestStepName(tsResult, e, step, &ranged, &rangedData, rangedIndex, printStepName) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff below looks complicated but it actually just move all the code related to v.RunTestStep
to the else
block of the if skip
conditional
process_testsuite.go
Outdated
for _, testStepResult := range tc.TestStepResults { | ||
if testStepResult.RangedEnable { | ||
hasRanged = true | ||
} | ||
if testStepResult.Status == StatusFail { | ||
hasFailure = true | ||
} | ||
if testStepResult.Status == StatusSkip { | ||
skippedSteps++ | ||
} | ||
} | ||
|
||
if verboseReport || hasRanged { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's because of my environment, but the newline seems to be printed too late when I run venom in verbose mode:
In my tests I moved this block to line 114 (just before v.runTestCase(ctx, ts, tc)
) and it seems to yield the correct output.
Since the output from #583 (comment) looked correct, I didn't touched it, but just wanted to make a note about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, fixed.
Signed-off-by: GitHub <noreply@github.com>
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
process_testsuite.go
Outdated
for _, testStepResult := range tc.TestStepResults { | ||
if testStepResult.RangedEnable { | ||
hasRanged = true | ||
} | ||
if testStepResult.Status == StatusFail { | ||
hasFailure = true | ||
} | ||
if testStepResult.Status == StatusSkip { | ||
skippedSteps++ | ||
} | ||
} | ||
|
||
if verboseReport || hasRanged { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, fixed.
Closes #486
Make it possible to
skip
at step level (currently it's only possible to do so at case level)If all steps from a case are skipped, then the case will also change its state to "SKIP" rather than "PASS"
Default output:
Verbose output:
Additionally this slightly changes the output of skipped test case when verbose mode is enabled to display that "all steps were skipped" rather than nothing, which could be misleading as a user may think that something is wrong with their test case definition
Current output