catchorg/Catch2
A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
2 releases in the last 90 days, the latest 29 days ago, with 405 contributors on GitHub.
Peaked at #24 in the weekly ranking the week of Jul 12, its best in the past year.
Use Cases & Benefits
- Provides a modern C++ native framework for unit testing, TDD, BDD, and micro-benchmarking using C++14 and later standards.
- Enables simple, natural test writing with expressive assertions and local setup/teardown without external dependencies.
- Use for writing unit tests in modern C++ projects requiring clear, maintainable test cases with expressive syntax.
- Use for implementing behavior-driven development (BDD) workflows in C++ to improve collaboration and test clarity.
- Use for benchmarking C++ code performance with integrated micro-benchmarking features alongside tests.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
Boost Software License 1.0
Permissive: commercial use, modification and redistribution are allowed with attribution.
Community files
- README: present
- Contributing guide: present
- Code of conduct: present
Watch-outs
No watch-outs from GStars' checks.
General guidance from repository metadata, not legal advice. How we score
From the README
Catch2 is mainly a unit testing framework for C++, but it also provides basic micro-benchmarking features, and simple BDD macros.
Catch2's main advantage is that using it is both simple and natural. Test names do not have to be valid identifiers, assertions look like normal C++ boolean expressions, and sections provide a nice and local way to share set-up and tear-down code in tests.
Note that benchmarks are not run by default, so you need to run it explicitly with the
[!benchmark]tag.You are on the
develbranch, where the v3 version is being developed. v3 brings a bunch of significant changes, the big one being that Catch2 is no longer a single-header library. Catch2 now behaves as a normal library, with multiple headers and separately compiled implementation.The documentation is slowly being updated to take these changes into account, but this work is currently still ongoing.
For migrating from the v2 releases to v3, you should look at our documentation. It provides a simple guidelines on getting started, and collects most common migration problems.
For the previous major version of Catch2 look into the
v2.xbranch here on GitHub.
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
Forks
3.4K-57
Open issues
457+18
Compared with peers in Testing
Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| D4Vinci/Scrapling | 101.1K | +6.3K | 75 | 6 days ago |
| nrwl/nx | 29.4K | — | 65 | 3 days ago |
| stretchr/testify | 26.2K | — | 56 | 78 days ago |
| gildas-lormeau/SingleFile | 22.9K | — | 35 | today |
| appium/appium | 22.2K | — | 60 | 1 day ago |
| catchorg/Catch2 | 21.6K | — | 63 | 29 days ago |
| Category median | 26.2K | — | 60 | — |
Discover Repositories
Search across tracked repositories by name or description