O'Reilly logo

Cucumber Cookbook by Shankar Garg

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

Configuring the Cucumber Console output

When we execute Cucumber Scenarios, it generates an output to the terminal or the eclipse console. There is a default behavior associated with that output and we can also configure that output as per our needs also. So how do we modify the default behavior, let's see this in the next section.

How to do it…

  1. Add the plugin option to @CucumberOptions and set its value to {"progress"}. This is how the @CucumberOptions code looks like:
    @CucumberOptions(  
        Features = "src/test/java/com/Features",
        glue = "com.StepDefinitions",
        Tags = { "~@wip","~@notImplemented","@sanity" },
        dryRun = false,
        strict = true,
        monochrome = true,
        plugin = { "progress" }
        )
  2. If we run the Scenarios now via the Terminal, this is what our output ...

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