Discussion:
[Cucumber] How to ignore certains scenarios in a feature
sai krishna
2014-12-07 15:16:27 UTC
Permalink
Hi All,

I have couple of features which holds about ~ 500 scenarios, on running a
particular feature which holds 20 scenarios, i would want to ignore running
certain scenarios in that feature. How can i do that?

I used @ignore tag on top of the scenario, but when i run my test that
scenarios with @ignore tag also gets executed

Regards,
Sai
--
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.
aslak hellesoy
2014-12-07 23:47:43 UTC
Permalink
Stick an @ignore tag on the ones you want to ignore and tell Cucumber to
run scenarios that do not have the @ignore tag:

--tags ~@ignore

More details here: https://github.com/cucumber/cucumber/wiki/Tags

BTW, 500 scenarios in a feature file sounds like a terrible idea. Are any
of the business stakeholders reading those, or did your team fall into the
Cucumber test trap? http://tooky.co.uk/the-cucumber-test-trap/

Aslak
Post by sai krishna
Hi All,
I have couple of features which holds about ~ 500 scenarios, on running a
particular feature which holds 20 scenarios, i would want to ignore running
certain scenarios in that feature. How can i do that?
Regards,
Sai
--
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.
sai krishna
2014-12-08 07:40:30 UTC
Permalink
Thanks Aslask, that worked for me.

--tags @clean --tags ~@ignore

I was able to run only the tags with clean and ignore the ones with @ignore
tag.

BTW, i have 500 scenarios in 14 features.
Post by sai krishna
Hi All,
I have couple of features which holds about ~ 500 scenarios, on running a
particular feature which holds 20 scenarios, i would want to ignore running
certain scenarios in that feature. How can i do that?
Regards,
Sai
--
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.
aslak hellesoy
2014-12-08 07:45:38 UTC
Permalink
Post by sai krishna
Thanks Aslask, that worked for me.
Glad that worked for you!
Post by sai krishna
I was able to run only the tags with clean and ignore the ones with
@ignore tag.
BTW, i have 500 scenarios in 14 features.
That sounds much better - I misread you.
Post by sai krishna
Post by sai krishna
Hi All,
I have couple of features which holds about ~ 500 scenarios, on running a
particular feature which holds 20 scenarios, i would want to ignore running
certain scenarios in that feature. How can i do that?
Regards,
Sai
--
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.
Continue reading on narkive:
Loading...