You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-run only failed tests (jobs) for Cloud parallel recording #1290
A GitHub Actions workflow contains a job using the parallel option of cypress-io/github-action recording to Cypress Cloud which runs Cypress tests in multiple containers.
GitHub Actions and Cypress Cloud should work together so that selecting Re-run failed jobs only re-runs failed jobs using a frozen set of load-balanced Cypress test specs, so that each failed job runs with the same test specs it used in its previous run. The Cypress tests which were distributed to other jobs, and which were previously successful, should not be re-run.
Why is this needed?
Reduce the overhead of re-running flaky tests without also running tests which were previously successful.
If you use the GitHub Actions facility for Re-running workflows and jobs, note that Re-running failed jobs in a workflow is not suited for use with parallel recording into Cypress Cloud. Re-running failed jobs in this situation does not simply re-run failed Cypress tests. Instead it re-runs all Cypress tests, load-balanced over the containers with failed jobs.
@MikeMcC399 I would like to investigate this issue. Can you confirm if a deep knowledge of Cypress Cloud's "inner workings" (how the parallelization works, etc.) is required?
Can you confirm if a deep knowledge of Cypress Cloud's "inner workings" (how the parallelization works, etc.) is required?
I can't help you with your question. https://docs.cypress.io/cloud/features/smart-orchestration/parallelization describes the parallel load-sharing process. Although the Cypress code on https://github.com/cypress-io/cypress is open source and online viewable, the Cypress Cloud code, which implements load-sharing, is proprietary to Cypress.io and not shared online. I don't have access to the Cypress Cloud code myself and so I can't say how much you would need to know about it.
changed the title [-]Re-run only failed tests for Cloud parallel recording[/-][+]Re-run only failed tests (jobs) for Cloud parallel recording[/+]on Nov 5, 2024
More than 3 years knowing about this, dozens of messages on the original issue, and no support from Cypress Cloud? That alone, to me, is making me look for e2e browser-based test support elsewhere. That even affects CCTs if you want to run them in parallel... that is, if any flaky test fails either on CCTs or e2e, you literally have to run your entire GHA test suite (all the checks) again.
Anyway, all good, the company probably has a good-ish (in their opinion) reason not address this issue for GHA and Cypress Cloud customers.
This issue is not resolvable by changing anything in this repo. It was opened and is left open for the possibility that the Cypress Cloud team might want to respond to it here, although the official route for Cypress Cloud support according to information on the Cypress Help Center page is through Cypress Cloud tickets for customers on a paid plan (Team, Business or Enterprise), and through Discord commmunity support for those using the free tier "Starter" plan.
If parallel recording steps using cypress-io/github-action in a GitHub Actions workflow are replaced with steps that use the Cypress CLI cypress run command instead, then the same issue remains, that the Re-run failed jobs button re-runs all Cypress test specs.
For example, if the steps section in the following snippet using cypress-io/github-action, is replaced:
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx cypress run --record --parallel
then the same problem occurs if Cypress test failures occur, but not in all the containers. The GitHub Actions button Re-run failed jobs re-runs only the failing containers, and Cypress Cloud load-balances all Cypress test-specs across the container sub-set. This indicates that the issue is not coming from cypress-io/github-action.
Even though this isn't the right place for the issue, because it concerns Cypress Cloud software which is not part of this repo, I'm not aware of any alternate place to view open issues that are specific to Cypress Cloud, so at this time I intend to leave it open here.
Is there a ticket I can follow in place of this Github issue?
If there were an alternate location to follow the progress of Cypress Cloud work, I would close this issue and defer to the alternate location. Cypress Cloud is however closed source, so unless Cypress.io started publishing a roadmap for Cypress Cloud, I don't know how this would work.
I notice the documentation page Cypress Cloud > Re-run optimization talks about an experimental option as part of a Cloud Business Plan to run only failed tests or run only failed specs.
It mentions GitHub Actions, however I couldn't find any specific reference to to Cypress Cloud recording from parallel GitHub Actions jobs.
Would you recommend it at this time as a full or partial solution to the issue described here?
Activity
theomelo commentedon Oct 31, 2024
@MikeMcC399 I would like to investigate this issue. Can you confirm if a deep knowledge of Cypress Cloud's "inner workings" (how the parallelization works, etc.) is required?
MikeMcC399 commentedon Nov 1, 2024
@theomelo
I can't help you with your question. https://docs.cypress.io/cloud/features/smart-orchestration/parallelization describes the parallel load-sharing process. Although the Cypress code on https://github.com/cypress-io/cypress is open source and online viewable, the Cypress Cloud code, which implements load-sharing, is proprietary to Cypress.io and not shared online. I don't have access to the Cypress Cloud code myself and so I can't say how much you would need to know about it.
[-]Re-run only failed tests for Cloud parallel recording[/-][+]Re-run only failed tests (jobs) for Cloud parallel recording[/+]brunokrebs commentedon Jun 11, 2025
More than 3 years knowing about this, dozens of messages on the original issue, and no support from Cypress Cloud? That alone, to me, is making me look for e2e browser-based test support elsewhere. That even affects CCTs if you want to run them in parallel... that is, if any flaky test fails either on CCTs or e2e, you literally have to run your entire GHA test suite (all the checks) again.
Anyway, all good, the company probably has a good-ish (in their opinion) reason not address this issue for GHA and Cypress Cloud customers.
MikeMcC399 commentedon Jun 13, 2025
This issue is not resolvable by changing anything in this repo. It was opened and is left open for the possibility that the Cypress Cloud team might want to respond to it here, although the official route for Cypress Cloud support according to information on the Cypress Help Center page is through Cypress Cloud tickets for customers on a paid plan (Team, Business or Enterprise), and through Discord commmunity support for those using the free tier "Starter" plan.
If parallel recording steps using
cypress-io/github-actionin a GitHub Actions workflow are replaced with steps that use the Cypress CLI cypress run command instead, then the same issue remains, that the Re-run failed jobs button re-runs all Cypress test specs.For example, if the
stepssection in the following snippet usingcypress-io/github-action, is replaced:using instead the Cypress CLI:
then the same problem occurs if Cypress test failures occur, but not in all the containers. The GitHub Actions button Re-run failed jobs re-runs only the failing containers, and Cypress Cloud load-balances all Cypress test-specs across the container sub-set. This indicates that the issue is not coming from
cypress-io/github-action.Even though this isn't the right place for the issue, because it concerns Cypress Cloud software which is not part of this repo, I'm not aware of any alternate place to view open issues that are specific to Cypress Cloud, so at this time I intend to leave it open here.
jennifer-shehane commentedon May 4, 2026
We are currently working on some solutions for having a way to re-run only failed specs within Cypress.
mellis481 commentedon Jun 8, 2026
@jennifer-shehane Is there a ticket I can follow in place of this Github issue?
MikeMcC399 commentedon Jun 9, 2026
@mellis481
If there were an alternate location to follow the progress of Cypress Cloud work, I would close this issue and defer to the alternate location. Cypress Cloud is however closed source, so unless Cypress.io started publishing a roadmap for Cypress Cloud, I don't know how this would work.
MikeMcC399 commentedon Sep 2, 2026
@jennifer-shehane
I notice the documentation page Cypress Cloud > Re-run optimization talks about an experimental option as part of a Cloud Business Plan to run only failed tests or run only failed specs.
It mentions GitHub Actions, however I couldn't find any specific reference to to Cypress Cloud recording from parallel GitHub Actions jobs.
Would you recommend it at this time as a full or partial solution to the issue described here?