Testing and quality · Library

Testing Library

A family of helpers for testing user interfaces the way people use them: find the button by its label, click it, and check what the user would see.

Test runners · Open source · updated

How it works

Instead of reaching into a component's internal state, Testing Library queries the rendered page by role, label or visible text, for example getByRole('button', { name: 'Pay' }). The user-event package simulates real typing and clicking, and jest-dom adds readable checks such as toBeVisible. Versions exist for React, Vue, Svelte, Angular, plain DOM and React Native.

It is not a test runner: it runs inside Jest or Vitest, usually with jsdom, and Cypress has an adapter, while Playwright's own locators follow the same idea. Because tests find elements the way assistive technology does, they nudge code towards accessible markup, and they survive refactors that do not change what users see.

Testing Library pricing

Open source

Free (MIT).

Approximate, checked September 2026.What the other tools cost

More in Testing and quality

Test runners

All 10 Testing and quality terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.