Discussion:
[Cucumber] how to force a cucumber scenario to pass?
Add Reply
Deena P
2018-02-02 12:18:01 UTC
Reply
Permalink
Raw Message
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?

Thanks
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Sundberg
2018-02-02 19:12:48 UTC
Reply
Permalink
Raw Message
Post by Deena P
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?
Before we suggest any solution to this, could you please share why you
don't want to run a scenario that has passed again? It did pass the
last time so there should not be any reason why it shouldn't pass
again. Unless a silly mistake has been done. The only cost is a bit
longer execution cycle. Why do you think this is a bad idea?

Please enlighten me. I am curios.
Thomas
Post by Deena P
Thanks
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
deena thayalan
2018-02-03 12:32:13 UTC
Reply
Permalink
Raw Message
Thanks for the response Thomas.

" I have my framework integrated with JIRA, wheneven I execute scripts, it
will check with JIRA for the testcase status, then will it run. " - We
check this condition for the same test cycle.

And I don't want to run the scenario is as I mentioned, it's getting re-run
for same testing cycle. We are running a jenkins build, if there were some
failed testcases due to services inconsistent, unexpected behavior or
issues, we just want continue to the testing for only the failed testcases
in the new build and so on.

Currently we are using JIRA for test report dashboard and above approach
working fine for JIRA report, the only problem is Cucumber reports summary
having the scenario as failed due to the SkipException (TestNG) or
AssumeTrue method (Junit) though it hasn't run.

I am just checking if there is any option to force "pass", or skip the
scenario without any errors in test summary.

Please enlighten me if you have any idea. Otherwise I will look for some
other solution to achieve this requirement.
Post by Deena P
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
Post by Deena P
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?
Before we suggest any solution to this, could you please share why you
don't want to run a scenario that has passed again? It did pass the
last time so there should not be any reason why it shouldn't pass
again. Unless a silly mistake has been done. The only cost is a bit
longer execution cycle. Why do you think this is a bad idea?
Please enlighten me. I am curios.
Thomas
Post by Deena P
Thanks
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups
"Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Thomas Sundberg
M. Sc. in Computer Science
Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Better software through faster feedback
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/cukes/FkM5YRBi_bU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Thanks,
Deena
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Koen Prins
2018-02-03 14:52:26 UTC
Reply
Permalink
Raw Message
Ah, there is your problem, you are testing with underlying service
inconsistencies. If the services are inconsistent, how can you trust your
test results that rely on these services? Can't you mock these services and
get mote reliable results?
Post by deena thayalan
Thanks for the response Thomas.
" I have my framework integrated with JIRA, wheneven I execute scripts, it
will check with JIRA for the testcase status, then will it run. " - We
check this condition for the same test cycle.
And I don't want to run the scenario is as I mentioned, it's getting
re-run for same testing cycle. We are running a jenkins build, if there
were some failed testcases due to services inconsistent, unexpected
behavior or issues, we just want continue to the testing for only the
failed testcases in the new build and so on.
Currently we are using JIRA for test report dashboard and above approach
working fine for JIRA report, the only problem is Cucumber reports summary
having the scenario as failed due to the SkipException (TestNG) or
AssumeTrue method (Junit) though it hasn't run.
I am just checking if there is any option to force "pass", or skip the
scenario without any errors in test summary.
Please enlighten me if you have any idea. Otherwise I will look for some
other solution to achieve this requirement.
Post by Deena P
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
Post by Deena P
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?
Before we suggest any solution to this, could you please share why you
don't want to run a scenario that has passed again? It did pass the
last time so there should not be any reason why it shouldn't pass
again. Unless a silly mistake has been done. The only cost is a bit
longer execution cycle. Why do you think this is a bad idea?
Please enlighten me. I am curios.
Thomas
Post by Deena P
Thanks
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google
Groups
Post by Deena P
"Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Deena P
For more options, visit https://groups.google.com/d/optout.
--
Thomas Sundberg
M. Sc. in Computer Science
Mobile: +46 70 767 33 15 <+46%2070%20767%2033%2015>
Blog: http://www.thinkcode.se/blog
Better software through faster feedback
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/cukes/FkM5YRBi_bU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Thanks,
Deena
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Deena P
2018-02-03 15:39:25 UTC
Reply
Permalink
Raw Message
Koen, I mention services inconsistency as an example, not all failing due
to service inconsistency. If 10% testcases failed in test automation, only
less than 5% failing due to services. But remaining are typical
selenium/appium framework issues. The example I gave is common is any
selenium/appium test automation if I am not wrong.

Thanks
Deena
Post by Koen Prins
Ah, there is your problem, you are testing with underlying service
inconsistencies. If the services are inconsistent, how can you trust your
test results that rely on these services? Can't you mock these services and
get mote reliable results?
Post by deena thayalan
Thanks for the response Thomas.
" I have my framework integrated with JIRA, wheneven I execute scripts, it
will check with JIRA for the testcase status, then will it run. " - We
check this condition for the same test cycle.
And I don't want to run the scenario is as I mentioned, it's getting
re-run for same testing cycle. We are running a jenkins build, if there
were some failed testcases due to services inconsistent, unexpected
behavior or issues, we just want continue to the testing for only the
failed testcases in the new build and so on.
Currently we are using JIRA for test report dashboard and above approach
working fine for JIRA report, the only problem is Cucumber reports summary
having the scenario as failed due to the SkipException (TestNG) or
AssumeTrue method (Junit) though it hasn't run.
I am just checking if there is any option to force "pass", or skip the
scenario without any errors in test summary.
Please enlighten me if you have any idea. Otherwise I will look for some
other solution to achieve this requirement.
Post by Deena P
I have my framework integrated with JIRA, wheneven I execute scripts,
it
Post by Deena P
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
Post by Deena P
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?
Before we suggest any solution to this, could you please share why you
don't want to run a scenario that has passed again? It did pass the
last time so there should not be any reason why it shouldn't pass
again. Unless a silly mistake has been done. The only cost is a bit
longer execution cycle. Why do you think this is a bad idea?
Please enlighten me. I am curios.
Thomas
Post by Deena P
Thanks
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google
Groups
Post by Deena P
"Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Deena P
For more options, visit https://groups.google.com/d/optout.
--
Thomas Sundberg
M. Sc. in Computer Science
Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Better software through faster feedback
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cukes/FkM5YRBi_bU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Thanks,
Deena
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eric Kessler
2018-02-03 03:01:38 UTC
Reply
Permalink
Raw Message
Post by Deena P
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
If you can check it's current status, could you instead not include the
test in the run beforehand instead of trying to short circumvent it at run
time?
Post by Deena P
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?
Thanks
Eric K
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...