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 Formatters

We think it’s starting to get distracting looking at the whole content of the feature in Cucumber’s output each time we run. Let’s switch to the progress formatter to get a more focused output. Run this command:

 $ ​​cucumber​​ ​​--format​​ ​​progress

You should see the following output:

 .ruby: No such file or directory -- calc.rb (LoadError)
 F-
 
 (::) failed steps (::)
 
 Command failed! (RuntimeError)
 ./features/step_definitions/calculator_steps.rb:10
 features/adding.feature:5
 
 Failing Scenarios:
 cucumber features/adding.feature:3 # Scenario: Add two numbers
 
 1 scenario (1 failed)
 3 steps (1 failed, 1 skipped, 1 passed)
 0m0.085s

Instead of printing the whole feature, the progress formatter has printed three ...

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