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…
- 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" } )
- If we run the Scenarios now via the Terminal, this is what our output ...
Get Cucumber Cookbook 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.