# 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)

Repository: https://github.com/catchorg/Catch2
Canonical: https://ross.abutalabs.com/products/catch2
Homepage: https://discord.gg/4CWS9zD
Language: C++
License: BSL-1.0
License Family: other
Topics: testing, test-framework, tdd, bdd, no-dependencies, framework, cpp14, cpp
Last push: 2026-08-25T07:33:08+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 5777, "days_push": 8, "days_rel": 8, "gap_med": 35.5, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 21444, forks 3502 (observed 2026-08-28T04:11:31.734777+00:00)

## What it is
Catch2 is a modern, C++-native unit testing framework supporting TDD and BDD styles, with no external dependencies. It also provides basic micro-benchmarking features and simple BDD macros, with natural assertion syntax and section-based test setup.

## Use cases
- write unit tests for C++ code
- do test-driven development in C++
- write BDD-style tests in C++
- microbenchmark C++ functions
- test C++ code without external dependencies
- share setup and teardown code between test sections

## When to choose
- you need a C++ testing framework with no dependencies
- you want natural, expression-based assertions
- you want TDD or BDD workflows in C++
- you need lightweight micro-benchmarking alongside tests

## When to avoid
- you need Google Test compatibility or gtest ecosystem tooling
- you need advanced mocking (use a dedicated mocking library)
- you require C++03 support (only in the old Catch1.x branch)

## Facets
- artifact type: framework
- maturity: stable
- function: testing, benchmarking
- domain: testing, developer-tools
- platform: cpp, cross-platform, windows
- tags: unit-testing, tdd, bdd, test-framework, header-only, no-dependencies, cpp14, cpp17, linux, macos

## Member repositories
- catchorg/Catch2 (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:31.734777+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:58:06.337338+00:00, confidence not recorded.
  - readme: https://github.com/catchorg/Catch2 (fetched 2026-08-28T04:11:31.734777+00:00, sha e798b56f2015)
  - homepage: https://discord.gg/4CWS9zD (fetched 2026-08-29T07:56:39.287941+00:00, sha a0ab2544a3be)
- Data as of 2026-08-30T08:39:29.467469+00:00.
