Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Unit Testing
  3. GoogleTest

GoogleTest

What it is

GoogleTest is Google’s C++ testing and mocking framework, based on the xUnit architecture. It supports many kinds of C++ tests, not only unit tests, and discovers and runs tests without manual registration. Assertions cover equality, inequality, exceptions, and other conditions, with support for user-defined assertions. Developers can use fatal or non-fatal failure handling, death tests, and value- or type-parameterized tests. GoogleTest can run individual tests, set their order, or run them in parallel. Quickstarts cover Bazel and CMake, while pkg-config files support compiling and linking GoogleTest and GoogleMock. The user guide includes introductory and advanced topics, mocking guides, FAQs, references, samples, and community documentation. The project publishes supported compiler, platform, and build-tool versions under Google’s Foundational C++ Support Policy. The 1.18.x branch requires at least C++17. GoogleTest is free and uses the BSD-3-Clause license, which permits source and binary redistribution subject to its conditions and disclaimer. It supports Linux, macOS, and Windows.

For and against

For

  • Discovers tests without manual registration
  • Supports fatal and non-fatal failures
  • Includes value- and type-parameterized tests
  • Can run tests in parallel

Against

  • The 1.18.x branch requires C++17

The verdict

GoogleTest offers a broad set of C++ testing and mocking capabilities, with documentation and build guidance for common workflows. Check its C++17 requirement for the 1.18.x branch when choosing a version.

Who it suits

GoogleTest suits C++ developers who need a framework for tests beyond unit testing, including parameterized or parallel runs. It is also relevant to teams using Bazel or CMake.

Plans and prices

GoogleTest

Free

free and open-source software · BSD 3-clause license

Every plan, in full

On the record

Adoption
The project lists Chromium, LLVM, Protocol Buffers, and OpenCV among notable users.github.com · read 1 Oct 2026
Architecture
GoogleTest is based on the xUnit testing framework architecture.github.com · read 1 Oct 2026
Assertions
GoogleTest provides assertions for equality, inequality, exceptions, and other conditions, and supports user-defined assertions.github.com · read 1 Oct 2026
Build integration
GoogleTest provides quickstarts for Bazel and CMake.google.github.io · read 1 Oct 2026
C++ requirement
The 1.18.x branch requires at least C++17.github.com · read 1 Oct 2026
Documentation support
The user guide includes primer, advanced topics, mocking guides, FAQs, references, samples, and community documentation.google.github.io · read 1 Oct 2026
Failure handling
GoogleTest supports death tests plus fatal and non-fatal test failures.github.com · read 1 Oct 2026
License
The repository uses the BSD-3-Clause license, permitting source and binary redistribution subject to its conditions and disclaimer.github.com · read 1 Oct 2026
Parameterized tests
GoogleTest supports value-parameterized and type-parameterized tests.github.com · read 1 Oct 2026
pkg-config
GoogleTest includes pkg-config files for compiling and linking GoogleTest and GoogleMock.google.github.io · read 1 Oct 2026
Purpose
GoogleTest is Google’s C++ testing and mocking framework.google.github.io · read 1 Oct 2026
Run options
GoogleTest can run individual tests, tests in a specific order, and tests in parallel.github.com · read 1 Oct 2026
Supported platforms
GoogleTest follows Google’s Foundational C++ Support Policy and publishes supported compiler, platform, and build-tool versions.google.github.io · read 1 Oct 2026
Test discovery
GoogleTest automatically discovers and runs tests without requiring manual registration.github.com · read 1 Oct 2026
Testing scope
GoogleTest supports any kind of C++ tests, not just unit tests.google.github.io · read 1 Oct 2026

Alternatives to GoogleTest

Every alternative, ranked