cypress-io / cypress

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

can we Expect Batch execution of related specs in one Mechine to even handle dependent specs in Cypress Cloud #27971

Closed KakaniSantosh closed 6 months ago

KakaniSantosh commented 1 year ago

What would you like?

can we Expect Batch execution of related specs in one Mechine to even handle dependent specs in Cypress Cloud

For example if I have 150 specs and among these 20 specs need to be run together because of dependency on common features and if we have 5 Mechines to run all of 150 in parallelization so if they provide any option such that to execute all these 20 Specs in the same Machine if i specify something like this

Npx cypress run --Batch[<Path of 20 specs which need to be executed in same mechine>]

so that the execution of these 20 specs will be done on single Machine and other machines will work as usual with parallelization and orchestration

i know programatically we can do this by simply creating one spec and calling all other 20 specs via import statement but the problem is all of them will be visible as one spec instead of 20 and there by giving no scope to read summary of specs being executed

If this kind of features are provided I am sure it will even help in executing dependent specs also

Why is this needed?

Some Complex projects need to have a mechanism to run dependent specs in one place so having this feature will help them

Other

No response

jennifer-shehane commented 1 year ago

@KakaniSantosh I think you should be able to achieve this today. Let me know if I'm missing something.

First machine

cypress run --spec "cypress/e2e/dependent_specs/**/*"

Subsequent machines

cypress run --spec "cypress/e2e/other_specs/**/*"

You may want to make sure your run completion delay is set to a high enough time if there's going to be any lag between the first and second calls to cypress run.

KakaniSantosh commented 1 year ago

Generally, when we use multiple VMs we give the same command to every VM so as per your suggestion we should be able to give dependent_specs in one machine and the rest of the things in other

but here it again leaves a question say if i have total of 3 mechines 1 gave dependent_specs command in first mechine and gave other_specs in subsequent machines

but what if the First machine completes its task then it won't be able to pick the rest of the other specs which can be picked from the queues so any other option to make it run such that once it's done with dependent specs it should be able to pick other specs from the queue so that the process goes fast

jennifer-shehane commented 1 year ago

If the other specs are dependent on a set of first specs running, it would have to run and complete first and somehow kick off a new machine to run the others. I don't know what CI provider you're using, but many CI providers offer this kind of workflow to start machines and run different commands after the previous machine is complete.

KakaniSantosh commented 1 year ago

Does it Support Azure DevOps, Aws and Google Cloud ?

cypress-app-bot commented 6 months ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

cypress-app-bot commented 6 months ago

This issue has been closed due to inactivity.