Closed pav-elis closed 3 years ago
If that is an option and maybe it is easier to implement: instead of saving all initial json files, there is more sence to save one final json which has all initial json files merged.
All mochawesome-report-generator flags can be used with this reporter
cypress.json
{
"reporter": "cypress-mochawesome-reporter",
"reporterOptions": {
"saveJson": true
}
}
this will save a JSON file with the final report
Hey @LironEr , thank you for your answer.
It is weird but in my case, I have it set in config. I'm using a multi reporter and two reporters with their own options in the reporter-config.json
file.
And weird enough, I can see during the run all json files appear, but after html generation - it seems like it overwrite the reports
folder completely and no json files saved after that.
Maybe you can give me a clue, what am I missing?
P.S.: I even tried to set it both in cypress.json
and in reporter-config.json
but it didn't help...
Try like this:
{
"reporterEnabled": "cypress-mochawesome-reporter, mocha-junit-reporter",
"mochaJunitReporterReporterOptions": {
"mochaFile": "cypress/results/xml/test-result-[hash].xml"
},
"cypressMochawesomeReporterReporterOptions": {
"saveJson": true
}
}
@LironEr Thank you, it works! Great reporter, keep up what you are doing! :)
The issue: Currently I'm trying to implement Cypress and Testrail integration. In order to do that, I am planning to use this reporter. But as long as cypress-mochawesome-reporter delete the initial json files with the results, I'm unable to continue.
Question/Feature I'd like to see: Any way how I can save both the html report and initial json files?
Thanks in advance!