Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |
Aeryn | | | | | | | | | | | | |
API Sanity Checker | | | | | | | | | | | | Unit test generator for C/C++ libraries. Can automatically generate reasonable input data for every API function. LGPL. |
ATF | | | | | | | | | | | | Originally developed for the NetBSD operating system but works well in most Unix-like platforms. Ability to install tests as part of a release. |
Bandit | | | | | | | | | | | | Header only. Automatic test registration. Specifically developed for C++11 |
Boost Test Library | | | | | | With additional library "Turtle" | | User decision | | Suites and labels | | Part of Boost. Powerful dataset concept for generating test cases. Different levels of fixtures. Powerful floating point comparison. |
BugEye | | | | | | | | | | | | Header-only. TAP output. |
QA Systems Cantata | Proprietary | | | | | | | | | | | Commercial. Automated unit and integration testing tool for C++. Certified testing for host or embedded systems. Code coverage and unique call interface control to simulate and intercept calls. |
Casmine | | | | | | | | | | | | C++17, modeled after the Jasmine testing framework, type-safe tests, auto-registration, BDD features, focused/disabled/pending tests, flexible configuration, colored console reporter, extendable, Windows/Linux/macOS |
Catch or Catch2 | | | | | | | | | | | | Header only, no external dependencies, auto-registration, tdd and bdd features |
CATCH-VC6 | | | | | | | | | | | | VC6 port of CATCH |
cfix | | | | | | | | | | | | Specialized for Windows development—both Win32 and NT kernel mode. Compatible to WinUnit. |
Cput | | | | | | | | | | Suites | | Library and MS Visual Studio add-in to create and run unit tests. Open Source. |
CPPOCL/test | | | | | | | | | | | | Released Under Apache 2.0, Compliant with C++ 98 and C++ 11. Works for Linux and Windows 32/64 bit using gcc, Cygwin, VS2005 and VS2015. Header file only library. Provides ability to write performance tests in a similar way to unit tests. Has some support for reporting memory leaks. |
CppTest | | | | | | | | | | Suites | | Released under LGPL |
cpptest-lite | | | | | | | | | | Suites | | Released under MIT. Developed for C++11. |
CppUnit | | | | | | | | | | Suites | | Released under LGPL |
Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |
CppUTest | | | | | | | | | | Suites | | Limited C++ set by design to keep usage easy and allow it to work on embedded platforms. C++ is buried in macros so the learning curve for C programmers is minimal. Ported to Symbian. Has a mocking support library CppUMock |
CppUnitLite | | | | | | | | | | Suites | | |
CPUnit | | | | | | | | | | | | Released under BSD. |
Criterion | | | | | | | | | | Suites | | Unit testing framework with automatic test registration. Needs C++11 compiler support for the C++ API. Supports theories and parameterized tests. Each test is run in its own process, so signals and crashes can be reported. Can output to multiple formats, like the TAP format or JUnit XML. Supported on Linux, OS X, FreeBSD, and Windows. |
libcester | | | | | | | | | | File | | A robust header only unit testing framework for C and C++ programming language. Support function mocking, memory leak detection, crash report. Works on various platorms including embedded systems and compatible with various compilers. Outputs to multiple format like TAP, JunitXML, TAPV13 or plain text. |
crpcut | | | | | | | | | | Suites within Suites | | BSD 2 clause. Runs each test in its own process, guaranteeing that the test suite continues even in the event of an unexpected crash or infinite loop. |
CUTE | | | | | | | | | | Suites | | CUTE with Eclipse CDT integration. Single line include, without inheritance. Mock support is provided by Mockator. |
cutee | | | | | | | | | | | | |
CxxTest | | | | | | * | Optional | | | Suites | | Uses a C++ parser and code generator for test registration. * Has a framework for generating mocks of global functions, but not for generating mocks of objects. |
doctest | | | | | | | | | | | | Light, feature rich C++ single header testing framework |
Embunit | | | | | | | | | | | | Commercial. Create unit tests for C/C++ and Embedded C++ |
Exercisix | | | | | | | | | | Executables | | Aimed to make adding tests as fast and easy as possible. |
FakeIt | | | | | | | | | | | | Use the latest C++11 features to create an expressive, yet very simple, API. |
FCTX | | | | | | | | | | | | Fast and complete unit testing framework all in one header. Declare and write your functions in one step. No dependencies. Cross platform. |
Fructose | | | | | | | | | | | | A simple unit test framework. |
Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |
Google C++ Mocking Framework | | | | | | | | | | | | |
Google Test | | | | | | | | | | | | Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, various options for running the tests, and XML test report generation. |
Hestia | | | | | | | | | | Suites | | Open source. Can test servers, libraries, and applications, and embedded software. Outputs to stdout, text, html, or xml files. Has several assertions for messaging, warnings, and exceptions, as well as plain conditions. |
Hippomocks | | | | | | | | | | | | |
Igloo | | | | | | | | | | | | BDD style unit testing in C++ |
lest | | | | | | | | | | | | Tiny header-only C++11 test framework |
liblittletest | | | | | | | | | | | | liblittletest is a portable, one file header-only C++ library for unit testing. Supports a rich set of assertions, automatic test discovering and various options for running the tests. |
libunittest | | | | | | | | | | | | libunittest is a portable C++ library for unit testing making use of C++11. |
mettle | | | | | | | | | | | | |
Typemock Isolator++ | | | | | | | | | | | | Commercial. Isolation/Mocking Framework for C/C++ |
Microsoft Unit Testing Framework for C++ | Proprietary | | | | | | | | | | | Commercial. Integrated into Microsoft Visual Studio 2012 IDE and later versions. |
Mockator | | | | | | | | | | | | Header-only mock object library and an Eclipse plug-in to create test doubles in a simple yet powerful way; leverages new C++11 language facilities while still being compatible with C++03; has built-in support for CUTE |
mock++/mockcpp | | | | | | | | | | Suites | | Simple testing framework for C++ |
mockitopp | | | | | | | | | | | | A C++ mock object framework providing similar syntax to mockito for [|Java]. |
mockpp | | | | | | | | | | Suites | | A C++ mocking framework hosted by Google |
Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |
NanoCppUnit | | | | | | | | | | Suites | | Proof-of-concept |
NullUnit | | | | | | | | | | Suites | | Low effort, easy to use. Supports automatic test discovery, user-defined assertions, fatal and non-fatal conditions, XML test report generation, and strong support for IDE integration. |
OAKUT | | | | | | | | | | XML | | Uses shared libraries / DLLs |
Opmock | | | | | | | | | | | | Stubbing and mocking framework for C and C++ based on code generation from headers. Does not imply modification to your existing code, so well suited for legacy code refactoring. In particular, you don't need virtual operations or abstract classes. Can check call parameters, call sequence, handle multiple implementations of a mock, and more. Includes as well a small unit testing framework, with Junit compatible xml output, but works also with any unit testing framework. |
Parasoft C/C++test | Proprietary | | | | | with proper configuration | | | | | | Commercial. Automated unit/component test generation and execution on host or embedded systems with code coverage and runtime error detection. Also provides static analysis and peer code review. |
QtTest | | | | | | | | | | | | Built on the ultra cross platform Qt Library. Allows testing on Windows, Mac OS X, Linux, BSD, Symbian, and any other platform Qt can build on. |
QuickCheck++ | | | | | | | | | | | | Framework for automatically generating tests. Inspired by QuickCheck |
QuickTest | | | | | | | | | | | | |
RapiTest | Proprietary | | | | | | | | | | | Focus is safety-critical/aerospace/DO-178C software, runs on embedded targets and on-host, has code coverage. |
Rexo | Public Domain | | | | | | | | | | | Framework for C89/C++ featuring automatic registration of tests and a polished API. |
SafetyNet | | | | | | | | | | | | Lightweight fast unit testing framework that is easy to set up and use. Works on Windows and Linux. Supports GNU C++, VC++, MinGW, QtSDK and can create test projects for VisualStudio, CodeBlocks, Eclipse, KDevelop |
ShortCUT | | | | | | | | | | | | |
STRIDE | Proprietary | | | | | | | | | | | Commercial. Embedded software quality solution that includes techniques for unit, API, Behavior & Integration testing as well as interactive reporting portal |
Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |
Symbian OS Unit | | | | | | | | | | | | Based on CxxTest |
TBrun | Proprietary | | | | | | | | | | | Commercial. Generators available across another component named TBExtreme |
Tessy | Proprietary | | | | | | | | | | | Commercial. |
TDOG | | | | | | | | | | Macro | | TDOG is a lightweight, portable and open source C++ xUnit Testing Framework. |
Test soon | | | | | | | Auto-detect | | | Macro | | Complex macro logic |
Testwell CTA++ | Proprietary | | | | | | | | | | | Commercial. |
tpunit++ | | | | | | | | | | | | A simple, portable C++ xUnit library contained in a single header. |
Trompeloeil | | | | | | | | | | | | Simple, yet powerful, single header framework for mocking. Requires C++14. |
TUT | | | | | | | | | | Templates | | Based on templates. Automatic test registration/discovery, customizable reports generation process, various tests run options. Easy adaptable to work on Windows CE. |
Unit++ | | | | | | | | | | | | |
unit.hpp | | | | | | | | | | | | Extremely lightweight single header unit testing framework. It follows the spirit of D in regards to unit tests. Automatic test discovery. RAII style test setup that are reusable in SECTIONs. |
UnitTest++ | | | | | | | | | | Suites | | UnitTest++ is free software. Simplicity, portability, speed, and small footprint are all important aspects of UnitTest++. |
upp11 | | | | | | | | | | | | Free software. Minimal, auto test registrations, parametrized tests, etc. C++11 only. |
UquoniTest | Proprietary | | | | | | | | | | | Commercial. Adds features like easy creation of test directories, Rich Booleans in assertions, and more. |
μt | | | | | | | | | | | | C++20 single header/single module, macro-free μ/Unit Testing Framework with no dependencies. |
VectorCAST/C++ | Proprietary | | | | | | | | | | | Commercial. Automated unit and integration testing, and code coverage. |
Visual Assert | | | | | | | | | | | | Unit-Testing Add-In for Visual Studio. Based on the cfix testing framework. |
WinUnit | | | | | | | | | | | | Focused more toward C/C++ than.NET developers |
Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |
xTests | | | | | | | | | | | | Depends on STLSoft C & C++ Libraries |
xUnit++ | | | | | | | |
| |
| | Supports running tests concurrently. Macros are only used for test setup, not for test assertions. |
tinytest | | | | | | | | | | | | Standalone, no dependencies, header-only. |
sTest | | | | | | | | | | | | Lightweight. Simple to use and write tests quickly. Counting, grouping and merging tests. Easy to modify output. Needs C++11. |
Name | License | xUnit | Fixtures | Group fixtures | Generators | Mocks | Exceptions | Macros | Templates | Grouping | Source | Remarks |