Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Testing
Testingeasy

What is the test pyramid and why does it matter?

Tags
#test-pyramid#strategy#quality
Back to categoryPractice quiz

Answer

The test pyramid says you should have many unit tests, fewer integration tests, and a small number of E2E tests. It matters because it balances speed, cost, and confidence.

Advanced answer

Deep dive

Pyramid is about feedback loops:

  • Unit tests run fast and isolate logic.
  • Integration tests catch wiring issues.
  • E2E tests cover critical user journeys only.

The goal is fast signal with minimal flakiness and maintenance.

Examples

Typical distribution:

70% unit / 20% integration / 10% E2E

Common pitfalls

  • Inverted pyramid (too many E2E).
  • Treating all logic as unit-only and missing integration bugs.
  • Not aligning tests to risk (critical flows under-tested).

Interview follow-ups

  • When would you intentionally add more E2E tests?
  • How do you decide the right mix for a small team?
  • How does the pyramid change for microservices?

Related questions

Testing
What does code coverage tell you and what does it not?
#coverage#quality#metrics