FE Group's Success Story with E2E Testing: Reducing Speed to the 30-Second Range with Sorry-Cypress
Key point
Applying Sorry-Cypress parallel testing reduced E2E execution time from over 2 minutes to the 30-second range.
Details
This article shares the trial and error and solutions encountered while introducing E2E testing to frontend projects. While E2E testing validates the entire application flow, three major hurdles existed: overlap with QA team tasks, maintenance difficulty, and slow execution speed.
Four Principles for Adoption
To ensure successful operation, the following strategies were established.
- Scenario creation based on specifications: Increased similarity to the QA team's test scope and reduced maintenance burden by synchronizing test code when specifications changed.
- Avoiding mock data: Used actual APIs to catch errors caused by environment differences and ensure test reliability.
- Pre-Push stage verification: Used Husky to enforce that only code passing E2E tests could be pushed.
- Introduction of parallel testing: Adopted the open-source Sorry-Cypress instead of Cypress's paid parallel testing.
Speed Optimization with Sorry-Cypress
Cypress does not support parallel testing by default, resulting in an issue where running 100 scenarios took approximately 10 minutes. This was resolved by introducing Sorry-Cypress to run multiple processes simultaneously in a local Docker environment. This significantly reduced test execution time from over 2 minutes to the 30-second range, and future test increases can be handled through additional process scaling.
Adoption Effects and Implications
Despite being an initial adoption, the team achieved results by discovering unexpected frontend bugs and API side effects. In particular, it automatically detects side effects when modifying other developers' code, reducing the burden of code changes. Since E2E testing is easy to adopt but difficult to manage, clear operational principles and speed optimization tools are essential.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.