tnicola / cypress-parallel

Reduce up to 40% your Cypress suite execution time parallelizing the test run on the same machine.
MIT License
578 stars 121 forks source link

Report contains result of only the last spec file that is run. How can I get the report to have all the results? #117

Open areeshaaltaf96 opened 2 years ago

areeshaaltaf96 commented 2 years ago

Hi,

So my problem is that I have many spec files in my Cypress project. When I use cypress-parallel, I get 2 folders runner-results and mochawesome-report. The HTML report generated within the mochawesome-report folder contains a report having the result of only the last spec file that was run, it does not include the other tests that were run previously.

This is the script I am running: "cy:parallel": "cypress-parallel -s cy:run -t 2 -d cypress/integration -r mochawesome",

Also, I am unable to manually use the merge commands of mochawesome to merge the test results into one consolidated html report. Can someone help me regarding this? I have already added "overwrite": false, in my cypress.json file in reporter options. Please let me know how I can overcome this issue?

joshuajtward commented 2 years ago

Hey @areeshaaltaf96! Can you share your cypress.json config and any other reporter configs you might have?

giejay commented 1 year ago

I had the same issue and fixed it by adding the following options to the cypress-parallel command:

--reporterOptions=mochaFile=reports/junit-report-[hash].xml
Infurnia-Nitin-Upadhyaya commented 1 year ago

Hey @areeshaaltaf96! Can you share your cypress.json config and any other reporter configs you might have?

@joshuajtward could you share the actual way to get all the specs files in the html file ?

Infurnia-Nitin-Upadhyaya commented 1 year ago

I had the same issue and fixed it by adding the following options to the cypress-parallel command:

--reporterOptions=mochaFile=reports/junit-report-[hash].xml

Could you share the actual cypress:parallel command of yours