React Testing Library
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What React Testing Library is
React Testing Library is a set of utilities for testing React components. It builds its helper functions over react-dom and react-dom/test-utils. Its guiding principle is that tests should resemble the way the software is used. Tests avoid component implementation details, so refactors that keep functionality do not break them. It works with components written as hooks or classes. It installs from npm as a development dependency, together with @testing-library/dom from version 16. Versions 13 and later require React 18. The optional @testing-library/jest-dom package adds custom Jest matchers.
Written from the project's README, read .
- Category
- Browser automation
- License
- MIT
- Language
- JavaScript
- Changelog
- Releases on GitHub
Repository metrics
Status
activeLast commit within 90 days of the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed browser automation tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from React Testing Library's, with its source. See also React Testing Library alternatives.
Nightwatch.js: Languages for writing tests: JavaScript or TypeScript (Node.js). source: Docs: Install Nightwatch
CodeceptJS: Languages for writing tests: JavaScript (ES6); TypeScript via generated type definitions. source: README
Taiko: Languages for writing tests: JavaScript, or languages that compile to JavaScript such as TypeScript. source: Docs: Frequently asked questions
DOM Testing Library: Browsers: DOM simulated with JSDOM (default in Jest) or a real browser. source: README
Playwright: Languages for writing tests: TypeScript; Python, .NET and Java versions. source: README
Cypress: Languages for writing tests: JavaScript and TypeScript (.js, .jsx, .ts, .tsx spec files). source: Docs: Writing and Organizing Tests
Selenium: Languages for writing tests: Java, Python, C#, Ruby, JavaScript, Kotlin. source: Docs: The Selenium Browser Automation Project
Playwright for Python: Languages for writing tests: Python (sync and async APIs); Playwright also available for Node.js, .NET and Java. source: README
Comparisons
How to install
npm install --save-dev @testing-library/react @testing-library/domQuestions
Is React Testing Library open source?
Yes. React Testing Library is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is React Testing Library maintained?
On 2026-09-22, the last commit to the default branch was on 2026-08-27, so the listed status is active. Rule: Last commit within 90 days of the fetch date.
How many GitHub stars does React Testing Library have?
19,656 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is React Testing Library written in?
The repository's primary language, as reported by the GitHub API, is JavaScript.
How do I install React Testing Library?
The README gives this command: npm install --save-dev @testing-library/react @testing-library/dom
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- README, read