Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

GoogleTest

google.github.io

  • Free plan
  • Windows
  • macOS
  • Linux
7.4 Club score Visit google.github.io

What GoogleTest is

GoogleTest is a free C++ framework for testing and mocking, built on the xUnit architecture. It supports different kinds of C++ tests, not only unit tests, and discovers tests automatically without manual registration. Its 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 cases. The framework can run selected tests, control their order, or execute them in parallel. Quickstarts cover Bazel and CMake, and pkg-config files support compiling and linking GoogleTest and GoogleMock. The documentation includes introductory and advanced material, mocking guidance, FAQs, references, samples, and community documentation. GoogleTest follows Google's Foundational C++ Support Policy and publishes supported compiler, platform, and build-tool versions. The 1.18.x branch requires C++17 or newer. It is available for Linux, macOS, and Windows under the BSD-3-Clause license, which allows redistribution subject to its terms and disclaimer.

Who it suits

GoogleTest suits C++ developers who need a framework for testing, mocking, and parameterized cases. Its Bazel and CMake quickstarts may help teams using either build tool.

Good to know, and what to watch

  • Discovers tests without manual registration
  • Supports fatal and non-fatal failures
  • Runs tests in parallel
  • Includes GoogleMock and pkg-config files
  • The 1.18.x branch requires at least C++17
  • Its supported compiler and tool versions follow a published policy

GoogleTest

Free

Free plan

The verdict

GoogleTest offers broad C++ test coverage, mocking, and several ways to organize or run cases. Check the published support policy and C++17 requirement for the 1.18.x branch against your development environment.

What the maker publishes

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

Checked against the maker's pages on 1 Oct 2026.