Skip to main content

Testing Pyramid Calculator

Enter your current test counts for unit, integration, and E2E tests. See your pyramid shape, compare to recommended ratios, and get advice on rebalancing your test suite.

✓ Visual pyramid diagram ✓ Ratio vs recommendation ✓ Health score & advice ✓ Multiple target strategies

Your Test Suite

Fast, isolated tests for functions, classes, and modules

Tests that verify component interaction, DB, or API calls

Browser/UI tests that simulate full user journeys

Your Pyramid

Ratio Analysis

Frequently Asked Questions

What is the testing pyramid?▼

The testing pyramid (introduced by Mike Cohn) is a framework for balancing test types by speed, cost, and coverage. Unit tests form the base (many, fast, cheap), integration tests are in the middle (some, moderate speed), and end-to-end (E2E) tests sit at the top (few, slow, expensive). The shape represents the recommended count ratio.

What are the ideal ratios for the testing pyramid?▼

A common starting point is 70% unit / 20% integration / 10% E2E. Kent Beck's original guidance was roughly 10:1 unit-to-integration. The ideal ratios depend on your architecture — microservices need more integration tests, UI-heavy apps need more E2E tests. Use this as a direction, not a rigid rule.

Why does the pyramid matter?▼

E2E tests are 10-100x slower than unit tests and much more brittle (flaky). Over-investing in E2E tests slows CI, wastes budget, and creates a frustrating development experience. The pyramid pushes teams toward fast, reliable unit tests as the foundation, using E2E tests only for critical user journeys.

What is an 'ice cream cone' anti-pattern?▼

An ice cream cone (inverted pyramid) has too many E2E tests and too few unit tests. This leads to slow CI (20+ minute pipelines), high flakiness rates, expensive maintenance, and poor coverage of edge cases. If your ratio is inverted, prioritize writing unit tests before adding more E2E tests.

What is the testing trophy?▼

The Testing Trophy (by Kent C. Dodds) de-emphasizes unit tests in favor of integration tests, arguing that integration tests give higher confidence per test. It has: Static (linting/types) → Unit → Integration (center, biggest) → E2E. This is popular in React testing with Testing Library.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →