cypress-parallel icon indicating copy to clipboard operation
cypress-parallel copied to clipboard

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

Open areeshaaltaf96 opened this issue 2 years ago • 4 comments

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?

areeshaaltaf96 avatar Jul 21 '22 12:07 areeshaaltaf96

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

joshuajtward avatar Sep 06 '22 07:09 joshuajtward

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

giejay avatar Nov 08 '22 20:11 giejay

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 ?

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