Adrian
Adrian

Reputation: 75

How to generate local report in cucumber?

I am trying to create local reports from cucumber tests using Javascript.

Documentation does not say much about how to do it besides listing all plugins: https://cucumber.io/docs/cucumber/reporting/

So far I have found way to publish my report thanks to some articles, but that is not what im looking for.

module.exports = {
    default: `--publish --format-options '{"snippetInterface": "synchronous"}'`,
  }

adding --publish creates report at web.

Anyone made local reports with cucumber in javascript and could help how to do it or what settings provide to cucumber?

Upvotes: 2

Views: 5326

Answers (1)

Heenu Pathak
Heenu Pathak

Reputation: 144

Can you please try the below in your runner class:

For HTML Report -

 @CucumberOptions(  features = "src/test/resources/functionalTests",    glue= {"stepDefinitions"},  plugin = { "pretty", "html:target/html-reports" },
    strict = true)

For Cucumber JSON Report -

 @CucumberOptions(  features = "src/test/resources/functionalTests",    glue= {"stepDefinitions"},  plugin = { "pretty", "json:target/cucumber-reports/Cucumber.json" },
    strict = true)  

please have a look on the below link, it has very good description of different reports generation.

generate reports

Upvotes: -1

Related Questions