I'm trying to setup cypress on my local machine and run parallel tests. But I can't find some information how to do this.
Technically, it's possible. Cypress does not recommend it since running multiple cypress instances on the same machine consumes lots of resources (CPU over all) and it slows down the entire machine performances with useless results.
Anyway if you have limited resources and you cannot use the official dashboard or you don't have more than one CI server available, you can run your test on a single machine launching cypress run multiple times dividing your test suite in multiple folders.
I've created a npm library called cypress-parallel
(https://github.com/tnicola/cypress-parallel) that (after the first run), balances and splits the test suite in multiple subsets, based on the tests run history and for each subset it launches a Cypress command. It also collect the results from all the specs file, logging them at the end of the execution. In terms of performances, it seems that with 2 processes you can improve your overall tests execution time time up to 40%.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With