doctest/doctest
The fastest feature-rich C++11/14/17/20/23 single-header testing framework observed · 2026-08-28
Health v2 · maintenance only
92/100
- Activity 98
- Release rhythm 80
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 46.5
- age_days: 4411
- days_rel: 58
- days_push: 15
- n_releases_24m: 5
Adoption not part of the score
6854 stars · 698 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
doctest is a single-header C++ testing framework for unit tests and TDD, supporting C++11 through C++23. It is designed to be the fastest feature-rich option, with dramatically reduced compile times and the ability to write tests directly in production code files.
Use cases
- write unit tests for C++ code with minimal compile-time overhead
- do test-driven development in C++ with tests inline in production source files
- replace heavyweight C++ test frameworks like GoogleTest or Catch2 for faster builds
- add a testing framework to a C++ project with just one header file
- run subcases and parameterized test cases in C++
- set up assertions and test fixtures in modern C++ (11-23)
When to choose
- compile time of your test suite is a bottleneck
- you want a lightweight, header-only, unintrusive testing setup
- you want tests self-registering directly in production code like Rust or D unittests
- you need support for a wide range of C++ standards from C++11 to C++23
When to avoid
- you need mocking frameworks or extensive ecosystem integrations out of the box
- your team already standardizes on GoogleTest or Catch2 with existing test infrastructure
- you need advanced features like property-based testing or built-in code coverage
Facets
library · maturity stable
testing e2e-testing benchmarking testing developer-tools cpp cross-platform windows header-only unit-testing tdd single-header test-framework cpp11 cpp23 cpp linux macos
2 sources
- readme: https://github.com/doctest/doctest · fetched 2026-08-28 · e6b393367076
- homepage: https://bit.ly/doctest-docs · fetched 2026-08-29 · 246d73dee1a0
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| doctest/doctest | main | 92 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem