Using Profiles

As you get comfortable with the various command-line options Cucumber has to offer and start to use more of them, it can be tedious to type it all on the command line over and over again. Cucumber lets you store the command-line options to a cucumber.yml YAML file. This file must be placed either in your project’s root directory or underneath a directory called config. Here is a sample cucumber.yml file:

 
default: ​--tags ~@wip --require features
 
wip: ​--tags @wip:3 --wip --require features

Now, if you run cucumber --profile wip, the command-line options keyed with wip: will be transparently appended to your command line. If you don’t specify a --profile argument (and you have a cucumber.yml file), Cucumber will pick the ...

Get The Cucumber Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.