Testing trophy

A test-suite shape with a fat integration layer, arguing that tests across real seams often buy the most useful confidence.

the trophy shaped testing diagramhow many unit vs integration tests should I writewrite tests not too many mostly integrationKent C Dodds testing shapetesting trohpymostly integration testswhich kind of test should I write most ofthat diagram with static checks at the bottom

What it is

The testing trophy is a picture of a test suite with four layers: static checks at the base, unit tests above them, a large integration layer, and a small end-to-end cap. Kent C. Dodds drew it in 2018 around Guillermo Rauch's line 'Write tests. Not too many. Mostly integration.', as a counterweight to rigid readings of the test pyramid. Its bet is that integration tests often buy the most useful confidence because they exercise real behavior across the seams where bugs collect.

Reach for the trophy as a budgeting heuristic when a suite has many tiny tests but still breaks whenever modules meet. Keep fast unit tests for dense logic, add integration tests around workflows and boundaries, and reserve browser tests for critical user journeys.

Gotcha: the trophy is not an instruction to label every test 'integration' or to boot the whole company stack for each assertion. A slow, shared, stateful middle becomes just as unreliable as an oversized E2E layer. The right shape follows your risks, architecture, and feedback budget.

Ask AI for it

Reshape this Vitest suite around the testing trophy. Keep static checks and focused unit tests, make integration tests the largest layer, and limit Playwright tests to the five user journeys whose failure would block release. Classify every existing test by layer, report count and runtime per layer, then replace mocked module-to-module interactions with integration tests that use the real collaborators and isolated fixtures. Set the CI time budget in minutes and explain every test you move or delete.

You might have meant

test pyramidintegration testunit testend to end testcode coverage