cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.68k stars 3.16k forks source link

Multithreading or process based parallized test runs #3599

Open tjerkw opened 5 years ago

tjerkw commented 5 years ago

Cypress parallelization only works on OS level (add more machines to add parallization). But there is no reason cypress couldn't run multiple tests in parallel on one machine, just like Selenium supports with the -w flag.

Ideally cypress --parallelization=n should just work. It could start one headless browser for each threads (or process) and run thread in parallel.

Cypress tests are inherently IO bound (they are interacting with an application. Therefore it should be easy to scale UP (one big beefy multicore machine) instead of scaling out (multiple machine)

I know this goes against the payment model of cypress (pay for parallization). But as an open source tool we should have this supported.

Falieson commented 4 years ago

Also.... its really lame running my cypress suite on my MBP and have it take forever because its single threading the test files.

Regenhardt commented 3 years ago

Just now found out our quite strong CI runner can't run cypress tests in parallel 😞 This seems to be an obvious feature.

qalinn commented 3 years ago

If this parallelization would be added maybe is a good idea to add a parameter where you can specify a list of the test environments against which you want to run the tests. That means a real parallelization.

million30 commented 3 years ago

Would this be included in the future release roadmap soon? Looks like the proposal has been accepted for quite a while.

qalinn commented 3 years ago

@million30 yes, It will be ice to have this implementation. Please take a look on my discussion/question. I have tried to explain how should looks this feature to have a big value. If it is not clear let me know and I will explain with more details.

please check here the discussion: https://github.com/cypress-io/cypress/discussions/15074#discussion-3219879

SKFrozenCloud commented 3 years ago

https://github.com/tnicola/cypress-parallel

Is that what you mean?

qalinn commented 3 years ago

@SKFrozenCloud Hello! no, is not the same. I want to be able to set baseurl for how many parallel tests you want to run.

trainoasis commented 2 years ago

Has someone found a workaround for this? We've recently implemented Cypress for e2e testing since a friend suggested it, but now coworkers started leaning towards Selenium just because of this feature. I'd prefer to stick with Cypress though, but seems this thread is not moving anywhere?