Can we ignore scenarios in calabash Ruby feature file

2k Views Asked by At

I was trying to Ignore my scenarios for my Calabash Feature file (Ruby) using @ignore. But i can still run ignored scenarios. I have latest calabash version with Ruby 2.0. please suggest me other ways to ignore scenarios in calabash Ruby feature file

2

There are 2 best solutions below

0
alannichols On

Cucumber doesn't automatically ignore tests that are labeled with @ignore, it is the same as any other tag.

When you run the tests add this (note the tilda ~) --tags ~@ignore and cucumber will ignore those tests.

i.e.

rake cucumber --tags ~@ignore

You can also use tags the same way to control tests you want to only run on certain environments etc.

0
tumul shyam verma On

The easiest way is to use tags.

For example if you have 5 scenario and you want to run only 3 of it, then assign a tag to the those three scenarios which you want to run and run the script with tags.

example:

scenario 1

@run

steps

scenario 2

steps

scenario 3

steps

scenario 4

@run

steps

scenario 5

@run

steps

command: calabash-android run application.apk --tags @run

this will run your scenario 1,4 and 5