googletest/README.md
2025-06-25 15:36:29 +03:00

4.2 KiB
Raw Blame History

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!