What We Just Learned

Cucumber has a rich set of command-line options that give you full control over how it behaves. You can do the following:

  • Run a subset of scenarios with --tags, --name, --line/--lines, or path:line.

  • Use the --format option to get progress, HTML, or JUnit reports.

  • List step definition statistics with --format usage and --format stepdefs.

  • Use the --require option to control where step definitions are loaded from.

  • Limit the work in progress with --wip and tag limits.

  • Define profiles in cucumber.yml and run them with a single --profile or -p option.

  • Integrate Cucumber into your Rake scripts.

Try This

We left out a couple of command-line options so you can experiment a little yourself. Here are some exercises you can try:

  • Use the command line to list the Gherkin keywords in another language, for example Pirate or LOLCAT. Just for fun, try to write a Cucumber scenario in one of those languages.

  • Run a scenario with a step that is matched by two different step definitions, one defining one argument and another defining two. After you get an Ambiguous error, run the scenario again, this time with --guess.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.24.180