What is e2e-test?
An e2e-test, short for end‑to‑end test, is a type of software test that checks whether an entire application works as a whole, from the user’s first interaction all the way through to the back‑end services and databases. It simulates real user actions (like clicking buttons, filling forms, or making purchases) to verify that every part of the system talks to each other correctly.
Let's break it down
- End‑to‑end: The test covers the full flow, not just a single piece of code.
- Test: It’s an automated script (or sometimes a manual checklist) that performs actions and checks results.
- User perspective: The test mimics what a real user would do in a browser or mobile app.
- All layers: It touches the UI, the API, the server, and the database, ensuring data moves correctly through each layer.
Why does it matter?
Because even if individual parts (unit tests) work fine, the way they connect can still break. e2e-tests catch those integration problems before real users see them, reducing bugs in production, improving user experience, and giving confidence that new features or changes haven’t broken existing workflows.
Where is it used?
- Web applications (e.g., online stores, SaaS dashboards)
- Mobile apps (iOS, Android)
- Desktop software with UI
- APIs that are accessed through a UI
- Continuous Integration pipelines, where tests run automatically on every code change
Good things about it
- Validates real user journeys, so bugs that matter to users are caught.
- Provides confidence for releases and deployments.
- Can be run automatically, saving manual testing time.
- Helps document how the system is supposed to work (the test scripts act as living documentation).
Not-so-good things
- Slower to run than unit or integration tests because they involve the whole stack.
- Can be flaky (fail intermittently) due to network latency, timing issues, or environment differences.
- Writing and maintaining e2e-tests can be complex and time‑consuming.
- Requires a stable test environment that mirrors production, which can be costly to set up.