Can I generate Mochawesome and Junit report, both for the same Cypress test?

How to generate both Mochawesome and Junit report for the same Cypress test?

Hello Devan,

Yes, you can generate both Mochawesome and Junit reports for your Cypress tests. Create a reporter.json file with below content:

{
"reporterEnabled": "mochawesome, mocha-junit-reporter",
"mochawesomeReporterOptions": {
"reportDir": "cypress/results/mocha"
},
"mochaJunitReporterReporterOptions": {
"mochaFile": "cypress/results/junit/results.xml"
}
}

In lambdatest-config.json file, pass reporter_config_file": "reporter.json in the run settings. Now run the test using lambdatest-cypress run command and both reports will be generated.