I am running my cypress tests in Jenkins using following command
npm run test -- --spec 'cypress/myspecs/myspec.cy.js' --browser chrome --headless --reporter mochawesome --reporter-options reportFilename=results_myspec
Now if the test goes fine, I can find the results_myspec.json in results directory. But sometimes when cypress crashes during the test run, I am not able to find the mochawesome report. How can I get the test results in case of cypress crash in Jenkins pipeline?
I am not able to find anything related to that?
Also I tried ways to avoid cypress crash but they are not helping
We detected that the Chrome Renderer process just crashed.
We have failed the current spec but will continue running the next spec.
This can happen for a number of different reasons.
If you're running lots of tests on a memory intense application.
- Try increasing the CPU/memory on the machine you're running on.
- Try enabling experimentalMemoryManagement in your config file.
- Try lowering numTestsKeptInMemory in your config file during 'cypress open'.
You can learn more here:
https://on.cypress.io/renderer-process-crashed
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 5000 │
│ Passing: 4000 │
│ Failing: 540 │
│ Pending: 500 │
│ Skipped: 460 │
│ Screenshots: 540 │
│ Video: false │
│ Duration: 809 minutes, 45 seconds │
│ Spec Ran: myspec.cy.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘