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

fix: proxy issues with service workers and clean up at end of specs #28060

Merged
merged 22 commits into from Oct 18, 2023

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Oct 15, 2023

Additional details

This PR fixes a performance regression with proxy correlations and service workers. Specifically this PR:

  • Ensures to track on CDP for service worker traffic (note that this only works in chrome - Proxy correlation does not work with traffic originating from service workers in non chromium browsers #28079)
    • This is done by attaching to service worker targets when they are spawned and then enabling Network traffic
  • Clears service worker information in between specs (note that this was causing some problems where cached data would leak between specs in electron)
  • Ensures that redirected requests that don't have expected CDP traffic (right now only downloads) have their redirects also respect the lack of expected CDP traffic

Steps to test

Several system tests were added to cover the scenarios involved

How has the user experience changed?

Performance should improve in scenarios where there are service workers

PR Tasks

@cypress
Copy link

cypress bot commented Oct 15, 2023

11 flaky tests on run #51703 ↗︎

0 4958 948 0 Flakiness 11

Details:

fix tests
Project: cypress Commit: d50d6aaf23
Status: Passed Duration: 13:27 💡
Started: Oct 18, 2023 12:24 AM Ended: Oct 18, 2023 12:38 AM
Flakiness  runs.cy.ts • 2 flaky tests • app-e2e

View Output Video

Test Artifacts
... > displays each run with correct information Test Replay Output Screenshots
App: Runs > no internet connection > shows correct message on create org modal Test Replay Output Screenshots
Flakiness  cypress-in-cypress.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress in Cypress > scales the AUT correctly in component Test Replay Output Screenshots
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Output Screenshots
Flakiness  debug.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App - Debug Page > shows information about a failed spec Test Replay Output Screenshots
Flakiness  commands/net_stubbing.cy.ts • 3 flaky tests • 5x-driver-webkit

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output
... > with `times` > only uses each handler N times Output
... > stops waiting when an xhr request is canceled Output

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

Review all test suite changes for PR #28060 ↗︎

@ryanthemanuel ryanthemanuel requested review from chrisbreiding, mschile and cacieprins and removed request for mschile October 16, 2023 19:17
cli/CHANGELOG.md Outdated Show resolved Hide resolved
cli/CHANGELOG.md Outdated Show resolved Hide resolved
@ryanthemanuel ryanthemanuel merged commit ff89ffa into develop Oct 18, 2023
80 of 82 checks passed
@ryanthemanuel ryanthemanuel deleted the ryanm/fix/vaious-prerequest-issues branch October 18, 2023 00:53
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 18, 2023

Released in 13.3.2.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants