Skip to content
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

Programmatically skipped steps which generate a skip are not highlighted as skipped in the report #320

Open
chadlwilson opened this issue Oct 14, 2024 · 0 comments

Comments

@chadlwilson
Copy link
Contributor

chadlwilson commented Oct 14, 2024

Expected behavior

As noted in getgauge/gauge-python#397, when programmatically skipping scenarios ( getgauge/gauge#2502 ) from a step or a hook, ideally it should be clear from the report which step generated the skip instruction.

Actual behavior

Currently the step shows as passed.

Steps to reproduce

  1. Use a gauge-dotnet or gauge-python project which has a step which throws/raises a SkipScenarioException
  2. View the html-report for that scenario
  3. Note that the step that generated the skip is passed, even though the scenario is shown as skipped.

It might be sufficient to change the code below

func getStepStatus(res *gm.ProtoStepExecutionResult) status {
if res.GetSkipped() {
return skip
}
if res.GetExecutionResult() == nil {
return notExecuted
}
if res.GetExecutionResult().GetFailed() {
return fail
}
return pass
}

and add the below after checking the executionResult however needs to be validated as to what it looks like and whether it displays in a way that is clear as to the reason the step is skipped since skips can be done for multiple reasons.

	if res.GetExecutionResult().GetSkipScenario() {
		return skip
	}

Gauge version

$ gauge -v
Gauge version: 1.6.9
Commit Hash: aff43ef

Plugins
-------
dotnet (0.7.2)
html-report (4.3.1)
python (0.4.7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant