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

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 ...

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