CppUTest
CppUTest is a free C/C++ xUnit framework for unit testing and test-driven development, often used in embedded systems.
What CppUTest is
CppUTest is a free C/C++ xUnit framework for unit testing and test-driven development, often used in embedded systems. It is designed for simplicity and portability across older and newer platforms. The framework provides test groups, setup and teardown, and assertions for conditions, comparisons, strings, numbers, pointers, and memory. CppUMock adds mocking support, and the manual describes optional Google Mock integration. C source files can use CppUTest macros and wrappers to register tests with the framework. Per-test memory leak detection compares memory use before setup with use after teardown, and additional plugins cover pointer restoration and floating-point exception flags. The command-line runner can produce JUnit-style XML and TeamCity XML for CI systems. The project documents builds from source with CMake or autoconf, along with Debian and Ubuntu packages and Homebrew for macOS. It supports Linux, macOS, Windows, and self-hosted use, and the repository identifies its license as BSD-3-Clause. One build limitation: MakefileWorker.mk is available for source builds, not pre-packaged installs.
Good
- Free and licensed under BSD-3-Clause
- Supports C and C++ test code
- Includes mocking and per-test memory leak detection
- Can emit JUnit-style and TeamCity XML output
- Documents multiple build and package options
Watch out
- MakefileWorker.mk is not supported by pre-packaged installs
- Optional Google Mock integration is separate from CppUMock
Who it suits
CppUTest suits C and C++ developers, including embedded-systems teams, who need unit testing, mocking, or memory checks. It is available for Linux, macOS, Windows, and self-hosted use.
Verdict
CppUTest offers test organization, assertions, mocking, and memory checks for C and C++ projects. Source-build users can use MakefileWorker.mk, but that option is unavailable with pre-packaged installs.
Plans and prices
From CppUTest's own pricing page, checked 8 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Free and open-source | Free | C/C++ unit testing and mocking framework |
The facts
Each one read from CppUTest's own pages, with the date it was checked.
What it does
- Assertions and test groups
- The core manual documents test groups, setup and teardown, and assertions for conditions, equality, strings, numbers, pointers, and memory.checked 8 Oct 2026
- Assertions and test organization
- The framework provides test groups, tests, setup and teardown, and assertion macros for conditions, comparisons, strings, pointers, and memory.checked 8 Oct 2026
- Build and installation
- The project documents source builds with CMake or autoconf, Debian and Ubuntu packages, and a Homebrew package for macOS.checked 8 Oct 2026
- C interface
- CppUTest provides macros for writing tests in C source files and wrappers that register those tests with CppUTest.checked 8 Oct 2026
- CI output
- The command line runner can output JUnit-style XML for CI systems and XML for TeamCity.checked 8 Oct 2026
- Design
- The project says its design goals include simplicity and portability to old and new platforms.checked 8 Oct 2026
- Intended users
- It is frequently used in embedded systems and is described as suitable for any C/C++ project.checked 8 Oct 2026
- License
- The project repository identifies its license as BSD-3-Clause.checked 8 Oct 2026
- Memory checking
- CppUTest includes per-test memory leak detection that checks whether memory use returns to its starting level after a test.checked 8 Oct 2026
- Memory leak detection
- The manual describes per-test memory leak detection that compares memory use before setup and after teardown.checked 8 Oct 2026
- Mocking
- CppUMock provides mocking support, and the manual also describes optional integration with Google Mock.checked 8 Oct 2026
- Notable limit
- The site says MakefileWorker.mk is available when building from source and is not supported by pre-packaged installs.checked 8 Oct 2026
- Other testing integrations
- The manual documents integration with Google Mock and running Google Tests alongside CppUTest tests in one binary.checked 8 Oct 2026
- Purpose
- CppUTest is a C/C++ xUnit framework for unit testing and test-driving code, frequently used in embedded systems.checked 8 Oct 2026
- Security and compliance
- The project repository identifies a BSD-3-Clause license; the pages reviewed do not state security certifications or compliance claims.checked 8 Oct 2026
- Support
- The project site directs users with questions to Google Groups and provides a GitHub issues page for bugs and feature requests.checked 8 Oct 2026
- Test-driven development
- Its stated design principles include simplicity, portability to old and new platforms, and support for test-driven development.checked 8 Oct 2026
- Test output
- The command-line runner can emit JUnit-style XML and TeamCity XML output for CI systems.checked 8 Oct 2026
- Test plugins
- Provided plugins include memory leak detection, pointer restoration, and checks for floating-point exception flags.checked 8 Oct 2026
Where it runs
- Platforms
- The site documents building with Visual Studio and says CppUTest works for any C/C++ project; it also provides Linux and macOS installation instructions.checked 8 Oct 2026





