cypress
cypress copied to clipboard
Cypress do not support group (folder) wise parallelization
Current behavior
We have grouped our specs into several folders. The reason for that is specs inside one folder is not independent from each other. (The first spec creates the resources for the group and the last spec delete them while other specs using those resources. This is also done to reduce time for repeatedly recreating resources for each spec in that group).
Now we have to integrate test parallelization to our cypress tests as the time for execution is too much. Can we do parallelization group wise or folder wise? ( note that we can't parallelize specs inside group as hey need to run sequentially)
Although this document [1] speaks about both grouping and parallelization I cant see an option for parallelization of groups
[1]. https://docs.cypress.io/guides/guides/parallelization#Grouping-test-runs
Desired behavior
Cypress should facilitate the capability to run tests parallel group wise
Test code to reproduce
Explained above
Cypress Version
9.7.0
Node version
14.17.0
Operating System
Ubuntu 22.04
Debug Logs
No response
Other
No response
@nagash77 Is running cypress parallelization group wise not supported at the moment ? Can you please confirm. Is this new feature included in Cypress Road-map ? Any ETA for delivering this as a feature. Highly appreciate your input on this.
You can achieve this by splitting the specs into groups and targeting them with a glob pattern...
// machine 1
cypress run --record --group foo --spec **/folder1/**.*
// machine 2
cypress run --record --group bar --spec **/folder2/**.*
This will enable you to chunk the groups across the same run but will not parallelize the specs inside of the each group, but would allow you to run multiple groups at the same time if they were run across different machines in CI
@ShanikaWickramasinghe were you able to give this a try?
@ShanikaWickramasinghe Going to go ahead and close this as Brian's suggestion should be a able to accomplished what you are asking for. If this does not seem to be the case, please let us know.