As you get comfortable with the 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 default: one.
Notice that we’ve added --require features to both profiles. This is because we want Cucumber to load step definitions and support code from the root directory automatically, no matter what folder we run the features from.