0

I am able generate single test case report but i want to generate single report of all test case. I generate report using mochawesome library. We want to merge all report into single or full report of test cases.

cypress.json

file code are:

{
  "reporter": "mochawesome",
  "reporterOptions": {
    "reportDir": "cypress/results",
    "overwrite": false,
    "html": false,
    "json": true
  }
}

package.json using code

{
  "scripts": {
    "delete:reports": "rm cypress/results/* || true",
    "prereport": "npm run delete:reports",
    "report": "cypress run --reporter cypress-multi-reporters --reporter-options configFile=reporter-config.json"
  }
}

But i am not able to merging report.So i need help in query :

npx mochawesome-merge "cypress/results/*.json" > mochawesome.json

this command through error

  • "this command through error" -> is this the error message of the merge tool? Can you provide two json reports that must be merged? So we can play around with the merge tool. I do not have any json report here currently – Josef Biehler Jan 30 '20 at 08:02
  • please adjust the title of your post. It is not about html/pdf. it is not even about cypress, just about mocha :-) – Josef Biehler Jan 30 '20 at 08:03

1 Answers1

0

Please ensure you are in the root directory when executing the npx merge. Also please share what error are you getting also are individual json files getting created in cypress/results folder

Ayansplatt
  • 51
  • 4