This is just my ramblings regarding Cypress and ideas/tips/tricks that I've encountered during my days with this amazing tool 😁.
Want parallel execution of your Cypress installation without using the default --parallel
option? See below!
npm install -D cypress-parallel
npm install -D mocha-junit-reporter
In package.json
"scripts": {
"start": "cypress open",
"test": "cypress run",
"test-speedy": "cypress-parallel -s test -t 4 --reporter mocha-junit-reporter --reporterOptions \"mochaFile=tests/test-output-[hash].xml,toConsole=true,attachments=true\""
},
Here we're using:
- 4 threads
- trigger
test
command (found in the scripts-section) - sets reporter to mocha-junit-reporter
- adds some configuration for the reporter
- Done ✅
You're done, and exeuction should now be happening in parallel!