O'Reilly logo

The Cucumber Book, 2nd Edition by Steve Tooke, Aslak Hellesoy, Matt Wynne

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running a Subset of Scenarios

As the number of features and scenarios grows, we’ll frequently run into situations where we want to run only a single (or maybe a couple) of scenarios to get faster feedback. This can be if we are working on a new scenario or if we have broken an existing one. Let’s take a closer look at how this works.

Filtering with Tag Expressions

The simplest way to use the --tags option is to give it a single tag to run, for example:

 $ ​​cucumber​​ ​​--tags​​ ​​@focus

This would cause Cucumber to run just the scenarios tagged with @focus. It’s quite common to temporarily tag a scenario or feature with a unique tag like this to filter what to run.

In some situations, we may want a little more control over the tag filtering. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required