mochawesome: provides empty report.json with error "Failed at the cypress@1.0.0 post_test script"

Viewed 808

Followed the below steps mentioned in tutorial: https://dev.to/bushraalam/using-mochawesome-reporter-with-cypress-54pf

  1. Installed necessary packages through npm
  2. Added pre and post scripts along with combine and generate report
  3. Ran test script and was able to see that folders getting created in "rm -R -f cypress/reports && mkdir cypress/reports && mkdir cypress/reports/mocha"
  4. But fails to generate report for the script - enter image description here

commands: "combine_reports": "mochawesome-merge ./cypress/reports/mocha/*.json > cypress/reports/mochareports/report.json", "generate_report": "marge cypress/reports/mochareports/ report.json -f report -o cypress/reports/mochareports", "post_test": "npm run combine_reports && npm run generate_report",

SOLUTION: "cypress run -r cypress-multi-reporters test_script --reporter mochawesome" - generated the correct .json files for all test suites

0 Answers
Related