Menu

The Testing Trophy, and Where TWD Fits
📰

The Testing Trophy, and Where TWD Fits

DEV Community: frontend·Kevin Julián Martínez Escobar·about 14 hours ago
#EforsLO3
#devtofrontend#devto#dev#tests#trophy
Reading 0:00
15s threshold

Most frontend teams I talk to have plenty of tests and still find out about broken screens from users. The unit tests are green, the refactor broke every one of them anyway, and nobody is sure the checkout flow works until someone clicks through it.

That tension is exactly what the Testing Trophy is about.

The trophy

Kent C. Dodds drew testing as a trophy instead of a pyramid. Four layers, and the size of each one is roughly how much of your effort it deserves:

Static: typos and type errors caught as you write the code. TypeScript, ESLint.

Unit: one function, hook or component checked in isolation. Vitest, Jest.

Integration: several units working together. The biggest part of the trophy.

End to End: a robot clicking through the deployed app, real backend included. Playwright, Cypress.

The shape comes from one line, written by Guillermo Rauch and popularized by Kent:

Write tests. Not too many. Mostly integration.

Each layer trades speed for confidence.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.