Skill Wiki v0.1.0
fact @community/fact-test-pyramid-ratios

Test Pyramid Ratios

Common observed test-suite distributions across mature codebases: (1) Mike Cohn's classical pyramid: 70% unit / 20% integration / 10% E2E, by test count. (2) Kent C.…

Skill
@community
Domain
testing
Version
1.0.0
Quality
4.0
Edges
6 out · 6 in
Tokens
358/885/1546
$ prime install @community/fact-test-pyramid-ratios

Projection

Always in _index.xml · the agent never has to ask for this.

TestPyramidRatios [fact] v1.0.0

Empirically observed test-suite ratios that produce fast, reliable CI: 70/20/10 (unit/integration/E2E) is the canonical pyramid; the Testing Trophy variant (5/30/55/10 = static/unit/integration/E2E) better fits frontend code; Google's published data shows their backends average ~80% unit, ~15% integration, ~5% E2E.

Common observed test-suite distributions across mature codebases: (1) Mike Cohn's classical pyramid: 70% unit / 20% integration / 10% E2E, by test count. (2) Kent C. Dodds' Testing Trophy (frontend): 5% static analysis / 30% unit / 55% integration / 10% E2E — emphasizes integration-style tests with React Testing Library + msw because most frontend bugs are at component boundaries. (3) Google's published distribution (2017 internal blog): ~80% unit / ~15% integration / ~5% E2E for backend services. (4) Microsoft Research data on flake rates: gating CI suites with E2E > 20% have 5-10x higher flake rates than pyramid-shaped suites. Execution time ratios are even more skewed: unit tests typically 10ms each, integration 1-3s, E2E 10-30s — a pyramid by test-count usually produces a strict pyramid by execution-time too. Coverage targets that are achievable AND meaningful: 80-90% line coverage on unit-test-friendly code (pure logic), 60-80% on glue code, intentionally not 100% (the last 20% targets defensive code paths, error handlers, and dead branches).

Source

prime-system/examples/frontend-design/primes/compiled/@community/fact-test-pyramid-ratios/atom.yaml

Compiled at 2026-05-07