4.2 KiB
GoogleTest
GoogleTest is Google’s 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 Google’s internal systems
🔮 Coming Soon: Integration with Abseil
📚 Table of Contents
- Getting Started
- Features
- Supported Platforms
- Who’s Using GoogleTest?
- Related Tools & Projects
- Contributing
Getting Started
Visit the GoogleTest User’s 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 Google’s Foundational C++ Support Policy.
See the support matrix for details on supported compilers, platforms, and tools.
Who’s Using GoogleTest?
GoogleTest is widely adopted both inside and outside of Google. Notable users include:
Related Tools & Projects
-
🎛 GTest Runner
Qt-based GUI for running tests on Windows and Linux. -
📊 GoogleTest UI
C# GUI that runs tests, displays results, and shows failure details interactively. -
🧪 GTest TAP Listener
Outputs test results in TAP format for integration with TAP-compatible tools. -
⚡ gtest-parallel
A parallel test runner for speeding up test execution. -
🧩 GoogleTest Adapter (VS Code)
View and run tests in a tree view in Visual Studio Code. -
🧪 C++ TestMate (VS Code)
Advanced test runner extension with support for GoogleTest. -
🥒 Cornichon
A Gherkin DSL parser that generates stub code for GoogleTest.
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!