0

While I am running npx cypress run I m getting the following error:

Your configFile threw an error from:
C:\CypressAutomation_\cypress.config.js

The error was thrown while executing your e2e.setupNodeEvents() function:

Error: Plugin misconfiguration: Cucumber preprocessor JSON report disabled

Make sure to enable the JSON report as described in https://github.com/badeball/cypress-cucumber-preprocessor/blob/master/docs/json-report.md at Object.initCucumberOptions (C:\CypressAutomation_\node_modules\cypress-xray-plugin\src\context.js:312:19) at async configureXrayPlugin (C:\CypressAutomation_\node_modules\cypress-xray-plugin\src\plugin.js:112:19) at async setupNodeEvents (C:\CypressAutomation_\cypress.config.js:57:7)

1 Answer 1

0

Take a look at this issue and advice from Badeball Unable to generate cucumber-report.json #970

JSON reports

JSON reports can be enabled using the json.enabled property. The preprocessor uses cosmiconfig, which means you can place configuration options in EG. .cypress-cucumber-preprocessorrc.json or package.json. An example configuration is shown below.

{
  "json": {
    "enabled": true
  }
}

The report is outputted to cucumber-report.json in the project directory, but can be configured through the json.output property.

Also, as an alternative to alter the report location,

Thanks, it worked. In fact, I tried it earlier and it was generating in the root folder. Now I am removing the .cypress-cucumber-preprocessorrc.json and using the following config in the package.json:

"cypress-cucumber-preprocessor": {
  "stepDefinitions": "cypress/e2e/\*\*/\*.{js,ts}",
  "json": {
    "enabled": true,
    "output": "cypress/generate-reports/cucumber-report.json"
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.