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

chore: fix flaky debug progress test #28958

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

jennifer-shehane
Copy link
Member

Additional details

We have a debug test that is testing a progress bar. This test is not actually written in a way where we are manually polling the progress bar, then asserting. It just has an interval that ticks the progress bar. Sometimes the tests wouldn't make it to the first 1/3 tests assertions until the progress bar had already gone to 2/3, causing this test to be flaky.

  • Failing Test Replay
  • Passing Test Replay

In this PR, I've increased the polling interval from 1 sec to 1.5 sec. I've also rearranged some of the tests and assertions to get to the 1/3 assertion more quickly. I also reduced the number of specs we're looking for from 5 to 3, otherwise we're waiting an extra 3 seconds for the progress bar to finish on things we're not even asserting on. This solution could probably be better, but hopefully this fixes most of the issues.

Failing case
Screenshot 2024-02-16 at 9 26 19 AM

Passing case
Screenshot 2024-02-16 at 9 26 12 AM

Steps to test

Run the debug.cy.ts test locally.

How has the user experience changed?

N/A

Copy link

cypress bot commented Feb 16, 2024

14 flaky tests on run #54074 ↗︎

0 28947 1341 0 Flakiness 14

Details:

empty commit
Project: cypress Commit: 9c3c94e586
Status: Passed Duration: 20:01 💡
Started: Feb 16, 2024 3:35 PM Ended: Feb 16, 2024 3:55 PM
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Screenshots
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
network stubbing > waiting and aliasing > yields the expected interception when two requests are raced Test Replay
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
network stubbing > waiting and aliasing > yields the expected interception when two requests are raced Test Replay
Flakiness  commands/waiting.cy.js • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route Test Replay
Flakiness  commands/waiting.cy.js • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route Test Replay

The first 5 flaky specs are shown, see all 10 specs in Cypress Cloud.

Review all test suite changes for PR #28958 ↗︎

@jennifer-shehane jennifer-shehane self-assigned this Feb 16, 2024
@jennifer-shehane jennifer-shehane merged commit c3cbe6f into develop Feb 22, 2024
80 of 82 checks passed
@jennifer-shehane jennifer-shehane deleted the fix-flake-debug-0 branch February 22, 2024 16:24
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 22, 2024

Released in 13.6.6.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.6, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants