Changing Cucumber’s Output

Cucumber’s default behavior is to output results similar to the Gherkin source text—with a little extra information such as colors, locations of matched step definitions, highlighting of arguments, and so on. This isn’t the only way to output results. Cucumber lets you use a different output format. For example, if you want a minimal report with a single character per step, you can use the progress formatter:

 $ ​​cucumber​​ ​​--format​​ ​​progress
 ..U--..F..

Each character represents the status of each step:

  • . means passing.
  • U means undefined.
  • - means skipped (or a Scenario Outline step).
  • F means failing.

Cucumber also has built-in formatters that output html, json, and junit. The latter is handy if you are running ...

Get The Cucumber Book, 2nd Edition 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.