Prompt
Do I need end-to-end tests for a web app if I already have unit tests and integration tests?
Latest observation
Oct 27, 2026
OpenAI APIWeb search: off
Not always—but often some end-to-end (E2E) tests are worth having.
Short answer
If you already have solid unit tests and integration tests, you may not need a large E2E suite. But E2E tests are useful for catching problems that those other tests usually miss, especially issues in the full user flow.
What each test type is best at
- Unit tests: validate individual functions/components in isolation
- Integration tests: check that multiple pieces work together
- E2E tests: verify the app works as a user would, across the full stack, UI to backend to database/external services
What E2E tests catch that others might not
- Routing or navigation issues
- Broken auth/session flows
- Frontend-backend contract mismatches that slip through mocks
- Deployment/environment/config problems
- Critical user journeys failing in real browsers
- “Everything works separately, but not together” bugs
When you might not need many E2E tests
You can keep E2E minimal if:
- Your app is small/simple
- Your integration tests already cover most real workflows
- You have strong monitoring and fast release cycles
- You can’t afford the maintenance/time cost of a big E2E suite
Good rule of thumb
Have a small number of high-value E2E tests for the most important flows, such as:
- Sign up / login
- Purchase / checkout
- Create / edit / save core content
- Any mission-critical workflow
Then rely on unit and integration tests for the bulk of coverage.
Practical recommendation
Use this testing pyramid idea:
- Many unit tests
- Some integration tests
- Few E2E tests
So: No, you don’t need lots of E2E tests if your other tests are strong—but you usually want at least a handful for critical user journeys.
If you want, I can help you decide what the right balance looks like for your specific app.