Improving E2E Efficiency in Cypress: From 10 to 4 Hours
summary
A large Cypress E2E suite drops from 10 to 4 hours by tackling concrete causes: memory bloat from retained DOM and verbose logs, expensive startup per spec, coupled tests, and widespread explicit waits. Solutions include enabling experimental memory management, filtering CI logs to assertion level with Cypress Log Filter, swapping explicit waits for assertions and configurable timeouts, adopting an ESBuild preprocessor to cut spec load time, isolating tests and running parallel namespaces on Kubernetes to prevent data leakage.
AI-written summary · about
chapters (14)
- 0:00Introduction and problem
- 3:13Current test suite issues
- 6:26Investigation and strategy
- 7:46Debugging memory consumption
- 9:12Reducing memory usage
- 10:40Log filtering solution
- 11:46Improving execution speed
- 13:54Eliminating explicit waits
- 15:41Using ESBuild for faster loading
- 16:45Optimizing polling operations
- 17:50Results and improvements
- 18:34Key takeaways and best practices
- 19:40Community and contributions
- 20:22Q&A session
