Reputation: 105
I have my framework integrated with JIRA, wheneven I execute scripts, it will check with JIRA for the testcase status, then will it run. If it's already passed, right now I am handling it with
throw new SkipException("\"Scenario: \\\"\" + scenario.getName() + \"\\\" is already passed in the previous test cycle\"");
But this fails the scenario in reports.
Instead I want to show this scenario as PASS in the report. Any solution?
Upvotes: 0
Views: 2020
Reputation: 12059
Cucumber JVM currently only recognizes org.junit.internal.AssumptionViolatedException
and org.junit.AssumptionViolatedException
as skip exceptions. These can be thrown through Junit Assume.
I assume you're using TestNG to throw the SkipException
. This exception is not supported. You'll have to create a PR to get it supported.
Upvotes: 1
Reputation: 4619
For this purpose there is built-in support for skipping scenario
just return skipped
string from your step.
As result it will be in special "Skipped" state which should be marked as OK in most of the reporting frameworks (usually gray color).
Upvotes: 0