Cypress 'cy.intercept()' latency spikes under concurrent requests
0 reputation · 29 Jan 2025, 06:31 UTC
Cypress 'cy.intercept()' latency spikes under concurrent requests
Goal: determine why network latency increases only when multiple requests are issued simultaneously in a test run.
Constraints: Cypress runs commands in the same event loop as the application, uses a single‑threaded proxy to intercept network traffic, and distributes tests across machines for parallelization rather than within a single browser instance.
Uncertainty: Is the latency due to the proxy’s serialization of intercepted requests, the browser’s event‑loop handling, or an internal Cypress throttling mechanism?
Specific Questions
- Does the Cypress proxy incur cumulative overhead when handling several concurrent
cy.intercept()calls? - Is the observed delay caused by the browser’s event loop being blocked by Cypress command execution?
- Would splitting tests into separate files and running them in parallel reduce the latency, indicating an internal queuing issue?