Cucumber integrates business logic with code, so our focus is on business rather than code. The same philosophy is also followed in the Cucumber reports. Cucumber reports are more about business utility rather than to do with more charts.
Robust automation frameworks generate very good and detailed reports, which can be shared with all stake holders. There are multiple options available for reports which can be used depending on the requirement. Let's check out how to use reports extensively in our next section.
For HTML reports, add
html:target/Cucumber
to the@CucumberOptions
plugin option. This is what the code for@CucumberOptions
looks like:@CucumberOptions( Features = "src/test/java/com/Features", glue = "com.StepDefinitions", Tags = { "~@wip","~@notImplemented","@sanity" }, dryRun = false, strict = true, monochrome = true, plugin = { "progress", "html:target/Cucumber" } )
For JSON...