Skip to content

feat: skip support at step level#592

Merged
yesnault merged 4 commits into
masterfrom
feat-step-skip
Oct 18, 2022
Merged

feat: skip support at step level#592
yesnault merged 4 commits into
masterfrom
feat-step-skip

Conversation

@lowlighter
Copy link
Copy Markdown
Member

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:
image

Verbose output:
image

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

image

Signed-off-by: GitHub <noreply@github.com>
Comment thread process_testcase.go
@@ -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)

Copy link
Copy Markdown
Member Author

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

Comment thread process_testsuite.go Outdated
}
}

if verboseReport || hasRanged {
Copy link
Copy Markdown
Member Author

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:
image

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, fixed.

@lowlighter lowlighter marked this pull request as ready for review October 17, 2022 17:52
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

86.8% 86.8% Coverage
0.0% 0.0% Duplication

Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
Comment thread process_testsuite.go Outdated
}
}

if verboseReport || hasRanged {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, fixed.

@yesnault yesnault merged commit 6259c5d into master Oct 18, 2022
@fsamin fsamin deleted the feat-step-skip branch September 29, 2023 07:13
storagebits pushed a commit to storagebits/venom that referenced this pull request Apr 17, 2026
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat request: skip at step level

3 participants