Skip to content
SPECIFICTION
Get listed

CppUTest

cpputest.github.io

Free plan WindowsmacOSLinuxSelf-hosted
Visit cpputest.github.io
Spec score 8.6 #1 of 32 in Unit Testing

What it is

CppUTest is a free C/C++ xUnit framework for unit testing and test-driven development, frequently used in embedded systems. It organizes tests into groups with setup and teardown, and provides assertions for conditions, comparisons, strings, numbers, pointers and memory. CppUMock supplies 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. Its per-test memory leak check compares memory use before setup with usage after teardown. Plugins cover memory leak detection, pointer restoration and floating-point exception flags. The command-line runner can emit JUnit-style XML and TeamCity XML for CI systems; the manual also describes running Google Tests alongside CppUTest tests in one binary. Build options include source builds using CMake or autoconf, Debian and Ubuntu packages, and Homebrew on macOS. It supports Linux, macOS, Windows and self-hosted use, and the repository identifies its license as BSD-3-Clause. One build limitation is that MakefileWorker.mk is available for source builds but is not supported by pre-packaged installs.

Spec sheet

Purpose
CppUTest is a C/C++ xUnit framework for unit testing and test-driving code, frequently used in embedded systems.Read 8 Oct 2026 · cpputest.github.io
Intended users
It is frequently used in embedded systems and is described as suitable for any C/C++ project.Read 8 Oct 2026 · cpputest.github.io
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.Read 8 Oct 2026 · cpputest.github.io
Support
The project site directs users with questions to Google Groups and provides a GitHub issues page for bugs and feature requests.Read 8 Oct 2026 · cpputest.github.io
License
The project repository identifies its license as BSD-3-Clause.Read 8 Oct 2026 · github.com
Assertions and test groups
The core manual documents test groups, setup and teardown, and assertions for conditions, equality, strings, numbers, pointers, and memory.Read 8 Oct 2026 · cpputest.github.io
Assertions and test organization
The framework provides test groups, tests, setup and teardown, and assertion macros for conditions, comparisons, strings, pointers, and memory.Read 8 Oct 2026 · cpputest.github.io
Build and installation
The project documents source builds with CMake or autoconf, Debian and Ubuntu packages, and a Homebrew package for macOS.Read 8 Oct 2026 · cpputest.github.io
C interface
CppUTest provides macros for writing tests in C source files and wrappers that register those tests with CppUTest.Read 8 Oct 2026 · cpputest.github.io
CI output
The command line runner can output JUnit-style XML for CI systems and XML for TeamCity.Read 8 Oct 2026 · cpputest.github.io
Design
The project says its design goals include simplicity and portability to old and new platforms.Read 8 Oct 2026 · cpputest.github.io
Memory checking
CppUTest includes per-test memory leak detection that checks whether memory use returns to its starting level after a test.Read 8 Oct 2026 · cpputest.github.io
Memory leak detection
The manual describes per-test memory leak detection that compares memory use before setup and after teardown.Read 8 Oct 2026 · cpputest.github.io
Mocking
CppUMock provides mocking support, and the manual also describes optional integration with Google Mock.Read 8 Oct 2026 · cpputest.github.io
Notable limit
The site says MakefileWorker.mk is available when building from source and is not supported by pre-packaged installs.Read 8 Oct 2026 · cpputest.github.io
Other testing integrations
The manual documents integration with Google Mock and running Google Tests alongside CppUTest tests in one binary.Read 8 Oct 2026 · cpputest.github.io
Security and compliance
The project repository identifies a BSD-3-Clause license; the pages reviewed do not state security certifications or compliance claims.Read 8 Oct 2026 · github.com
Test output
The command-line runner can emit JUnit-style XML and TeamCity XML output for CI systems.Read 8 Oct 2026 · cpputest.github.io
Test plugins
Provided plugins include memory leak detection, pointer restoration, and checks for floating-point exception flags.Read 8 Oct 2026 · cpputest.github.io
Test-driven development
Its stated design principles include simplicity, portability to old and new platforms, and support for test-driven development.Read 8 Oct 2026 · cpputest.github.io

Plans and prices

Free and open-source Free C/C++ unit testing and mocking framework Read 8 Oct 2026 · github.com

Every CppUTest plan and price →

Strong points and limits

Strong points

  • Free C/C++ unit-testing framework
  • CppUMock provides mocking support
  • Per-test memory leak detection
  • JUnit-style and TeamCity XML output
  • Supports C source test registration

Limits

  • MakefileWorker.mk is unsupported by pre-packaged installs
  • Google Mock integration is optional
  • Build paths include source builds or platform-specific packages

Who it suits

CppUTest suits developers testing C or C++ projects, particularly embedded systems, who want unit testing, mocks and memory checks. It is available for Linux, macOS, Windows and self-hosted setups.

Verdict

CppUTest offers a broad set of testing and mocking tools, including C test support, memory checks and CI output. Check the build method if you depend on MakefileWorker.mk, since that file is not supported by pre-packaged installs.

Where Specifiction places it

Alternatives to CppUTestAll alternatives →