Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky test: The tests fail on cloud while triggered via GitHub actions randomly but passes in local or rerun #30839

Open
janavi-p opened this issue Jan 8, 2025 · 1 comment
Labels
stage: awaiting response Potential fix was proposed; awaiting response

Comments

@janavi-p
Copy link

janavi-p commented Jan 8, 2025

Link to Cypress Cloud or CircleCI failure

Cypress test always fails in GitHub Actions but not locally and passes on re-run.

Link to failing test in GitHub

Version:
│ Cypress: 13.17.0
│ Browser: Chrome 131
│ Node Version: v20.18.0 (/home/runner/runners/2.321.0/externals/node20/bin/node)
│ RUN url: https://cloud.cypress.io/projects/5f538t/runs/1518/test-results/e3f02b06-02f2-48e0-85d4-c9d68ad2ef44?actions=%5B%5D&browsers=%5B%5D&groups=%5B%5D&isFlaky=%5B%5D&modificationDateRange=%7B%22startDate%22%3A%221970-01-01%22%2C%22endDate%22%3A%222038-01-19%22%7D&orderBy=EXECUTION_ORDER&oses=%5B%5D&specs=%5B%7B%22label%22%3A%22specs%2Fregression-specs%2Fstaging%2Fcritical-flows%2Frounds_singapore_taxes_gi.cy.js%22%2C%22value%22%3A%22%5B%5C%2242877c82-cc15-460b-ba2e-49d372651459%5C%22%5D%22%7D%5D&statuses=%5B%5D&testingTypesEnum=%5B%5D

│ Searched: specs/regression-specs/staging/critical-flows/rounds_singapore_taxes_gi.cy.js

Analysis

This test is not supposed to be flaky as it passes 100% in local

Cypress Version

13.17.0

Other

No response

@jennifer-shehane
Copy link
Member

@janavi-p Typically these situations where a test is flaky in CI vs locally mean that there is some difference in timinf or environment in CI versus locally. My process when I encounter this is to:

  • Run the test locally in cypress open mode
  • Open the Test Replay so that it is side by side with the tests in open mode
  • Go line by line through the Command Log to see what is different between the two.

We've solved many flaky tests with this method - generally seeing a difference in timing where we need to update our test and ensure a specific test before it continues.

@jennifer-shehane jennifer-shehane added the stage: awaiting response Potential fix was proposed; awaiting response label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: awaiting response Potential fix was proposed; awaiting response
Projects
None yet
Development

No branches or pull requests

2 participants