RapidCheck
RapidCheck is a free C++ framework for property-based testing: it generates random inputs and runs specified properties to search for cases that disprove them.
What RapidCheck is
RapidCheck is a free C++ framework for property-based testing: it generates random inputs and runs specified properties to search for cases that disprove them. Developers provide properties as callables to rc::check, which repeatedly tests them with generated values. Built-in generators cover common types, and combinators can be used to create custom generators. Its arbitrary-value generation includes standard types such as vectors, maps, sets, tuples, pairs, strings, and chrono types. When a property fails, RapidCheck tries to shrink the input and report a smaller counterexample. It also supports stateful testing by generating valid operation sequences. Listed test-library integrations include Boost Test, Google Test, Google Mock, and Catch. By default, a property passes after 100 successful runs, and that count can be changed. RapidCheck uses CMake, can be added as a CMake subdirectory, and requires a C++11-compliant compiler. It is distributed under a BSD 2-Clause license. Its user guide is unfinished, and the API may change because it has not stabilized.
Good
- Generates random inputs to challenge properties
- Shrinks failures to smaller counterexamples
- Includes generators for common STL types
- Supports stateful operation-sequence testing
- Integrates with several listed test libraries
Watch out
- The user guide is still in progress
- The API may change at any time
- Requires a C++11-compliant compiler
Who it suits
It suits C++ developers who want generated inputs and smaller counterexamples when testing properties. It may also fit projects that need stateful testing or integration with the listed test libraries.
Verdict
RapidCheck offers property-based and stateful testing with generated data, shrinking, and integrations for several test libraries. Its unfinished documentation and unstable API are important considerations for teams adopting it.
The facts
Each one read from RapidCheck's own pages, with the date it was checked.
What it does
- API stability
- The User Guide says the API has not stabilized and may change at any time.checked 30 Sep 2026
- Build
- RapidCheck uses CMake and can be added as a subdirectory to a CMake project.checked 30 Sep 2026
- Build requirements
- RapidCheck uses CMake and requires a C++11-compliant compiler; the README lists Clang 3.5, GCC 4.9 and Visual Studio 2015 as CI compiler versions.checked 30 Sep 2026
- Catch integration
- RapidCheck also documents basic integration with the Catch test library.checked 30 Sep 2026
- Counterexamples
- When it finds a failing case, RapidCheck tries to shrink it to a smaller counterexample.checked 30 Sep 2026
- Documentation status
- The User Guide says it is a work in progress and that some parts are still missing.checked 30 Sep 2026
- Features
- The README lists imperative property definitions, test case shrinking, STL support including maps and sets, and combinators for creating generators.checked 30 Sep 2026
- Generators
- RapidCheck includes generators for common types and combinators for building custom generators.checked 30 Sep 2026
- Integrations
- The README lists integrations with Boost Test, Google Test and Google Mock.checked 30 Sep 2026
- License
- The repository identifies its license as BSD-2-Clause.checked 30 Sep 2026
- Limitations
- The user guide says it is a work in progress, and the API has not stabilized and may change at any time.checked 30 Sep 2026
- Property checks
- Properties are implemented as callables passed to rc::check, and RapidCheck repeatedly calls them with generated inputs.checked 30 Sep 2026
- Purpose
- RapidCheck is a C++ framework for property-based testing inspired by QuickCheck and similar frameworks.checked 30 Sep 2026
- Requirements
- RapidCheck uses C++11 and requires a compliant compiler.checked 30 Sep 2026
- Shrinking
- When a property fails, RapidCheck tries to find the smallest failing test case and displays it as a counterexample.checked 30 Sep 2026
- Stateful testing
- The README describes stateful testing based on commands in the style of Erlang QuickCheck.checked 30 Sep 2026
- STL support
- Built-in arbitrary-value generation supports types including vectors, maps, sets, tuples, pairs, strings and chrono types.checked 30 Sep 2026
- Test defaults
- A property passes by default after 100 successful tests, and the number is configurable.checked 30 Sep 2026
- Test generation
- It generates random test data to search for inputs that falsify a property.checked 30 Sep 2026
- What it does
- RapidCheck is a C++ framework for property-based testing that generates random test data to find counterexamples to properties.checked 30 Sep 2026
Alternatives to RapidCheck
- 1

fast-check
Free planOpen sourceWebAPILinuxSelf-hosted7.1Free plan - 2
ScalaCheck
Free planLinuxmacOSWindows6.6Free plan - 3
Gopter
Free planLinuxSelf-hosted6.4Free plan - 4
JSVerify
Free planWebSelf-hosted6.4Free plan - 5
Racket QuickCheck
Free planLinuxmacOSWindows6.4Free plan - 6
FsCheck
Free planLinuxmacOSWindows6.3Free plan
