End-to-end test
ee-too-ee test
An automated test that simulates a real user interacting with the full application from start to finish.
An end-to-end test drives your application the way a real user would. It opens a browser, clicks buttons, fills in forms, navigates pages, and checks that the right things appear on screen. The test touches every layer: the frontend, the backend, the database, third-party services. If the user flow works in an E2E test, it works in production.
E2E tests are the most realistic tests you can write. They are also the slowest, the most fragile, and the most expensive to maintain. A unit test runs in milliseconds. An E2E test might take 30 seconds. A suite of 500 E2E tests can take an hour. That cost means you need to be selective about what you test end-to-end.
The best teams use E2E tests for critical user journeys only. Sign up, log in, make a purchase, invite a teammate. These are the flows where a failure means lost revenue or lost users. Everything else gets covered by faster unit and integration tests. Playwright and Cypress are the most popular E2E testing tools in the JavaScript ecosystem. Selenium still dominates in enterprise environments.
Examples
An e-commerce team protects checkout from regressions.
The team writes 12 E2E tests covering the full purchase flow: add to cart, enter shipping address, apply discount code, enter payment info, confirm order, and verify the confirmation email. These tests run against a staging environment before every production deploy. When a CSS change accidentally hides the 'Place Order' button, the E2E test catches it before any customer is affected.
A SaaS company tests its onboarding funnel.
The team writes E2E tests for the signup flow: enter email, verify email, set password, complete profile, create first project, invite a teammate. The tests run in Playwright on every PR. When a backend change breaks the email verification step, the E2E test fails in CI and the PR cannot merge. The team fixes the bug before it reaches production.
A team discovers their E2E test suite is too slow.
The team has 800 E2E tests that take 3 hours to run. Developers stop waiting for results and merge without green tests. The team audits the suite and finds 500 tests that duplicate coverage from unit and integration tests. They delete those, parallelize the remaining 300 across 10 browser instances, and get the suite down to 18 minutes. Developers start trusting the pipeline again.
In practice
Read more on the blog
Frequently asked questions
How many E2E tests should a project have?
Fewer than you think. Most projects do well with 20-50 E2E tests covering the critical user journeys. The testing pyramid is a useful mental model: many unit tests at the base, fewer integration tests in the middle, and a small number of E2E tests at the top. If your E2E suite takes more than 20 minutes, you probably have too many. Focus on the flows where a failure costs you money or users.
Why are E2E tests so flaky?
E2E tests interact with the full system, and full systems have timing issues. A button might render a few milliseconds late. A database query might be slow. A third-party API might timeout. Each of these can cause a test to fail even though the code is correct. The fix is to use proper waiting strategies (wait for elements to appear, not fixed sleep timers), use test-specific environments with consistent data, and retry flaky tests once before reporting failure. Tools like Playwright have built-in auto-waiting that helps significantly.
Related terms
An automated test that verifies a small, isolated piece of code behaves correctly.
An automated test that verifies multiple components or services work correctly together.
Quality assurance: the practice of testing software to find bugs before users do.
Continuous integration and continuous deployment: automating code testing and delivery to production.
A metric measuring what percentage of source code is executed by automated tests.

Want the complete playbook?
Picks and Shovels is the definitive guide to developer marketing. Amazon #1 bestseller with practical strategies from 30 years of marketing to developers.