Followed the below steps mentioned in tutorial: https://dev.to/bushraalam/using-mochawesome-reporter-with-cypress-54pf
- Installed necessary packages through npm
- Added pre and post scripts along with combine and generate report
- 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"
- But fails to generate report for the script -
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