GoogleTest - Google Testing and Mocking Framework
2025-06-25 15:38:41 +03:00
.github/ISSUE_TEMPLATE Delete the unofficial GitHub actions tests. 2024-04-03 07:06:06 -07:00
ci GoogleTest CI Update 2025-05-15 09:42:50 -07:00
docs Add documentation for exception matchers. 2025-06-24 06:22:36 -07:00
googlemock Add UnpackStructImpl for structs with 24, 25 and 26 fields. 2025-06-12 09:37:31 -07:00
googletest In MatcherCast, store the input value as its own type rather than as the Matcher type, to avoid dangling references 2025-06-09 12:07:01 -07:00
.clang-format Googletest export 2021-01-15 15:53:39 -05:00
.gitignore Add support for Bzlmod for the next release 2024-01-25 10:27:52 -08:00
BUILD.bazel Delete the absl polyfill support for std::any, std::optional 2025-05-20 10:25:35 -07:00
CMakeLists.txt Update docs for v1.16.x branch 2025-02-07 09:41:05 -08:00
CONTRIBUTING.md Merge pull request #4343 from sthd:http-to-https 2023-08-22 10:24:02 -07:00
CONTRIBUTORS Add myself to Contributors 2024-01-31 21:11:21 +09:00
fake_fuchsia_sdk.bzl Put the fake Fuchsia SDK in a module extension 2024-12-23 13:33:10 -08:00
googletest_deps.bzl GoogleTest CI Update 2025-05-15 09:42:50 -07:00
LICENSE Wrong LICENSE file, sorry. Corrected. [skip ci] 2017-12-08 23:16:46 -05:00
MODULE.bazel GoogleTest CI Update 2025-05-15 09:42:50 -07:00
README.md Update README.md 2025-06-25 15:38:41 +03:00
WORKSPACE Update GoogleTest dependencies in preparation for release 2025-04-30 06:31:27 -07:00
WORKSPACE.bzlmod Add support for Bzlmod for the next release 2024-01-25 10:27:52 -08:00

GoogleTest

GoogleTest is Googles C++ test framework, designed for writing reliable and maintainable tests.

📄 Documentation: https://google.github.io/googletest/
🚀 Latest Release: v1.17.0
⚠️ Minimum Requirement: C++17
CI: Built using Googles internal systems
🔮 Coming Soon: Integration with Abseil


📚 Table of Contents


Getting Started

Visit the GoogleTest Users Guide for comprehensive documentation.

We recommend starting with the GoogleTest Primer to get a feel for writing your first tests.

Instructions for building GoogleTest can be found in the googletest/README.md file.


Features

GoogleTest offers a rich set of capabilities for testing C++ code:

  • xUnit Framework
    Follows the well-known xUnit architecture for structuring tests.

  • Automatic Test Discovery
    Tests are automatically detected and executed—no manual registration required.

  • Comprehensive Assertions
    Includes a wide variety of assertions for testing equality, inequality, exceptions, boolean conditions, floating-point values, and more.

  • Custom Assertions
    Easily define your own assertions for application-specific checks.

  • Death Tests
    Validate that certain code paths cause the program to exit (useful for error handling).

  • Fatal vs. Non-Fatal Failures
    Choose whether a failure should abort the test or allow further execution.

  • Value-Parameterized Tests
    Run a test case multiple times with different input values.

  • Type-Parameterized Tests
    Run the same test logic over multiple data types.

  • Flexible Execution
    Run individual tests, filter tests by name, or run tests in parallel.


Supported Platforms

GoogleTest adheres to Googles Foundational C++ Support Policy.

See the support matrix for details on supported compilers, platforms, and tools.


Whos Using GoogleTest?

GoogleTest is widely adopted both inside and outside of Google. Notable users include:



Contributing

We welcome contributions!

Please read the CONTRIBUTING.md guide for details on how to participate in development, report bugs, or submit pull requests.


Happy testing!