E2E Test

E2E Test

E2E testing (End-to-End testing) is a testing methodology that simulates user interactions to drive requests through the entire system via a browser or API, verifying that the expected results are produced.

Reproducing Real User Experiences

E2E tests drive an application from the "outside." They automate a browser to fill in forms, click buttons, and verify everything end-to-end — from screen transitions to data persistence. Tools like Playwright and Cypress control a headless browser to reproduce human interactions through scripts.

Databases and API servers that were replaced with mocks in unit tests and functional tests run as real instances in E2E tests. Because authentication flows, permission checks, and data reads and writes all pass through actual infrastructure, integration-level defects can be detected.

Balancing Against Cost

Execution time can be hundreds of times longer than unit tests, due to the combined overhead of browser startup, page rendering, and network communication. In addition, minor UI changes tend to break tests easily (the flakiness problem). For this reason, a practical operational approach is to limit E2E tests to critical user flows and keep the total count in the range of tens to a few hundred.

In the test pyramid model, E2E tests sit at the apex and are kept to a minimum. A stable configuration covers the majority of logic with unit tests at the base, addresses integration points with functional tests in the middle layer, and reserves E2E tests solely for critical paths.