GoogleTest

B
B tier on Unit Testing FrameworksScore 7.1 · #5 of 32
Android app
Not listed
Free plan
Yes
Runs on
Linux, Mac, Windows
google.github.io
The GoogleTest homepage

Summary

GoogleTest is Google’s C++ framework for testing and mocking. Based on the xUnit architecture, it supports many kinds of C++ tests rather than only unit tests, and discovers and runs tests without manual registration. Its assertions cover equality, inequality, exceptions and other conditions, with support for custom assertions. The framework offers fatal and non-fatal failure handling, death tests, and value- or type-parameterized cases. Developers can run selected tests, set their order or run them in parallel. GoogleTest provides quickstarts for Bazel and CMake, plus pkg-config files for compiling and linking GoogleTest and GoogleMock. Its guide includes introductory and advanced material, mocking guidance, FAQs, references, examples and community documentation. The project follows Google’s Foundational C++ Support Policy and publishes supported compiler, platform and build-tool versions. The 1.18.x branch requires at least C++17. GoogleTest is free and uses the BSD-3-Clause license, which permits redistribution subject to its terms.

Who it is for

It suits C++ developers who need testing and mocking across different kinds of tests. Teams using Bazel or CMake can refer to its quickstarts.

What is good

  • Automatically discovers tests
  • Supports fatal and non-fatal failures
  • Includes value- and type-parameterized tests
  • Can run tests in parallel
  • Free under the BSD-3-Clause license

What to know first

  • The 1.18.x branch requires C++17
  • Supported compiler and tool versions vary

Verdict

GoogleTest covers test discovery, assertions, mocking and several ways to organize or run C++ tests. Check the published support policy and the C++17 requirement for the 1.18.x branch against your development setup.

GoogleTest plans and pricing

All plans
GoogleTest Free free and open-source software · BSD 3-clause license en.wikipedia.org · 1 Oct 2026

Compared on unit testing frameworks

Free plan
Yesgoogle.github.io
Supported languages
C++google.github.io
Built-in mocks
Yesgoogle.github.io
Parameterized cases
Yesgoogle.github.io
Parallel execution
Yesgoogle.github.io

Facts

Purpose
GoogleTest is Google’s C++ testing and mocking framework.google.github.io · 1 Oct 2026
Testing scope
GoogleTest supports any kind of C++ tests, not just unit tests.google.github.io · 1 Oct 2026
Architecture
GoogleTest is based on the xUnit testing framework architecture.github.com · 1 Oct 2026
Test discovery
GoogleTest automatically discovers and runs tests without requiring manual registration.github.com · 1 Oct 2026
Assertions
GoogleTest provides assertions for equality, inequality, exceptions, and other conditions, and supports user-defined assertions.github.com · 1 Oct 2026
Failure handling
GoogleTest supports death tests plus fatal and non-fatal test failures.github.com · 1 Oct 2026
Parameterized tests
GoogleTest supports value-parameterized and type-parameterized tests.github.com · 1 Oct 2026
Run options
GoogleTest can run individual tests, tests in a specific order, and tests in parallel.github.com · 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 · 1 Oct 2026
C++ requirement
The 1.18.x branch requires at least C++17.github.com · 1 Oct 2026
Build integration
GoogleTest provides quickstarts for Bazel and CMake.google.github.io · 1 Oct 2026
pkg-config
GoogleTest includes pkg-config files for compiling and linking GoogleTest and GoogleMock.google.github.io · 1 Oct 2026
Documentation support
The user guide includes primer, advanced topics, mocking guides, FAQs, references, samples, and community documentation.google.github.io · 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 · 1 Oct 2026
Adoption
The project lists Chromium, LLVM, Protocol Buffers, and OpenCV among notable users.github.com · 1 Oct 2026

Best GoogleTest alternatives

See all 12

Where it ranks on Everything Xiaomi

Is GoogleTest yours?

Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.

Sources