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

Add a way to disable proxy #22319

Closed
gajus opened this issue Jun 14, 2022 · 4 comments
Closed

Add a way to disable proxy #22319

gajus opened this issue Jun 14, 2022 · 4 comments
Labels
E2E Issue related to end-to-end testing type: enhancement Requested enhancement of existing feature

Comments

@gajus
Copy link

gajus commented Jun 14, 2022

What would you like?

According to https://www.cypress.io/blog/2019/05/22/how-we-improved-network-speed-by-300-in-cypress-3-3-0/, Cypress proxies all requests in order to:

  • injects a global window.Cypress object that can be used by the application under test to determine if it is running inside of Cypress.
  • removes framebusting JavaScript so that Cypress can properly run the applicatin under test within an iframe.
  • replaces absolute references to window.top and window.parent to the correct frame reference (since window.top points to Cypress's window instead of the application's window).

However, this comes at a major performance cost.

I would heavily prefer if Cypress did not proxy any requests, but instead provided a way to inject the necessary logic into the main application, e.g. as an NPM package.

Why is this needed?

This would drastically improve performance and reliability of Cypress tests.

@csvan
Copy link

csvan commented Dec 16, 2022

I can't overstate what a massive improvement this would be, and I would be more than willing to help work on it. The performance penalty becomes even more pronounced in apps with a large number of chunks and other initial requests.

Like @gajus suggests it seems unlikely that this cannot be handled inside the runtime environment itself rather than having an entire proxy layer between the browser and network.

@gajus
Copy link
Author

gajus commented Dec 16, 2022

We are done with Cypress. Letting someone else advocate for this.

@gajus gajus closed this as completed Dec 16, 2022
@csvan
Copy link

csvan commented Dec 16, 2022

Sad to hear that @gajus, may I know what you opted for instead? There has been some internal pressure here to move to Playwright (primarily for performance reasons) but we are lobbying hard to stay with Cypress ourselves.

@gajus
Copy link
Author

gajus commented Dec 16, 2022

Yeah, no, moving away from Cypress to Playwright, while very painful, was the best decision we ever made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

5 participants