CppUnit is a C++ unit testing framework. It started its life as a port of JUnit to C++ by Michael Feathers. For a quick tour of unit testing with CppUnit, see the Cookbook in the latest documentation. For an introduction to unit testing, see UnitTest, ProgrammerTest, and CodeUnitTestFirst.
Features:
- XML output with hooks for additional data (XSL format avaliable in release 1.10.2 needs some FiXing)
- Compiler-like text output to integrate with an IDE
- Helper macros for easier test suite declaration
- Hierarchical test fixture support
- Test registry to reduce recompilation need
- Test plug-in for faster compile/test cycle (self testable dynamic library)
- Protector to encapsulate test execution (allow capture of exception not derived from std::exception)
- MfcTestRunner
- QtTestRunner, a Qt based graphic test runner
This page is a list of tables of code-driven unit testing frameworks for various programming languages. Some but not all of these are based on xUnit.
UnitTest++ is a lightweight unit testing framework for C++.
It was designed to do test-driven development on a wide variety of platforms. Simplicity, portability, speed, and small footprint are all very important aspects of UnitTest++.
UnitTest++ is ANSI portable C++ and makes minimal use of advanced library and languages features, which means it should be easily portable to just about any platform. Out of the box, the following platforms are supported:
WinUnit offers a unique approach to unit testing native (C/C++) code on Windows.
WinUnit was originally introduced in the article “Simplified Unit Testing for Native C Applications” by Maria Blees in the February 2008 issue of MSDN Magazine. Click here to read the article and learn more about WinUnit.
Features:
- One executable which runs tests in separate DLLs
- One header file to make writing tests easier
- Logger extensibility
- Easy to automate
- Macros for use in Visual Studio