Saturday, October 24, 2026 4,350 lists 78,096 records on file
List your app or device

  1. Home
  2. Unit Testing
  3. CppUTest

CppUTest

What it is

CppUTest is a free C and C++ xUnit framework for unit testing and test-driven development, with frequent use in embedded systems. It is designed around simplicity and portability across older and newer platforms and is described as suitable for C/C++ projects generally. Tests are organized into groups with setup and teardown, while assertion macros cover conditions, comparisons, strings, numbers, pointers, and memory. CppUMock adds mocking, and the documentation describes optional Google Mock integration. C source files can use provided macros and wrappers to register tests. Per-test memory leak detection compares memory use before setup with usage after teardown, and plugins also cover pointer restoration and floating-point exception flags. The command-line runner can produce JUnit-style XML and TeamCity XML for CI systems. Build documentation covers CMake, autoconf, Debian and Ubuntu packages, and Homebrew on macOS. CppUTest supports Linux, macOS, Windows, and self-hosted use. It is licensed under BSD-3-Clause.

For and against

For

  • Free BSD-3-Clause project
  • Supports C and C++ tests
  • Includes built-in mocking support
  • Provides per-test memory leak detection
  • Outputs JUnit and TeamCity XML

Against

  • MakefileWorker.mk excludes pre-packaged installs
  • Google Mock integration is optional
  • Documentation-led setup may require source builds

The verdict

CppUTest provides a broad testing toolkit for C and C++ projects without a license cost. Its assertions, mocks, memory checks, plugins, and CI output address common unit-testing workflows across several platforms.

Who it suits

CppUTest suits developers writing C or C++ software, especially embedded-system teams. It also fits projects needing mocks, memory checks, and CI-readable test output.

Plans and prices

Free and open-source

Free

C/C++ unit testing and mocking framework

Every plan, in full

On the record

Assertions and test groups
The core manual documents test groups, setup and teardown, and assertions for conditions, equality, strings, numbers, pointers, and memory.cpputest.github.io · read 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.cpputest.github.io · read 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.cpputest.github.io · read 8 Oct 2026
C interface
CppUTest provides macros for writing tests in C source files and wrappers that register those tests with CppUTest.cpputest.github.io · read 8 Oct 2026
CI output
The command line runner can output JUnit-style XML for CI systems and XML for TeamCity.cpputest.github.io · read 8 Oct 2026
Design
The project says its design goals include simplicity and portability to old and new platforms.cpputest.github.io · read 8 Oct 2026
Intended users
It is frequently used in embedded systems and is described as suitable for any C/C++ project.cpputest.github.io · read 8 Oct 2026
License
The project repository identifies its license as BSD-3-Clause.github.com · read 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.cpputest.github.io · read 8 Oct 2026
Memory leak detection
The manual describes per-test memory leak detection that compares memory use before setup and after teardown.cpputest.github.io · read 8 Oct 2026
Mocking
CppUMock provides mocking support, and the manual also describes optional integration with Google Mock.cpputest.github.io · read 8 Oct 2026
Notable limit
The site says MakefileWorker.mk is available when building from source and is not supported by pre-packaged installs.cpputest.github.io · read 8 Oct 2026
Other testing integrations
The manual documents integration with Google Mock and running Google Tests alongside CppUTest tests in one binary.cpputest.github.io · read 8 Oct 2026
Purpose
CppUTest is a C/C++ xUnit framework for unit testing and test-driving code, frequently used in embedded systems.cpputest.github.io · read 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.github.com · read 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.cpputest.github.io · read 8 Oct 2026
Test-driven development
Its stated design principles include simplicity, portability to old and new platforms, and support for test-driven development.cpputest.github.io · read 8 Oct 2026
Test output
The command-line runner can emit JUnit-style XML and TeamCity XML output for CI systems.cpputest.github.io · read 8 Oct 2026

Alternatives to CppUTest

Every alternative, ranked