googletest

GoogleTest - Google Testing and Mocking Framework

130 articles 39.2k View on GitHub ↗
130 articles
How to Handle and Test Exceptions in GoogleTest: Complete Guide to Exception Assertions

Learn to handle and test C++ exceptions in GoogleTest with EXPECT_THROW and ASSERT_THROW macros. Verify exception behavior efficiently and improve your test coverage.

how-to-guide
Sep 2, 2026
How to Set Up Global Fixtures and Environment for GoogleTest: A Complete Guide

Learn to set up global fixtures and environment for GoogleTest. This guide shows how to subclass testing Environment, override SetUp and TearDown, and register your custom environment.

how-to-guide
Sep 2, 2026
How to Customize GoogleTest Output and Reporting: A Complete Guide to the Listener Architecture

Customize GoogleTest output and reporting by manipulating listeners and flags. Learn to add, remove, or replace reporters for enhanced test results.

how-to-guide
Sep 2, 2026
GoogleTest Command-Line Flags: Complete Guide to Controlling Test Execution

Master GoogleTest command-line flags to filter tests, format output, manage execution, and configure behavior without code changes. Boost your testing efficiency today.

how-to-guide
Sep 2, 2026
How GoogleTest Matchers Enable Advanced C++ Assertions

Master GoogleTest matchers for advanced C++ assertions. Learn how this type-safe framework enables expressive validation beyond simple checks and explains assertion failures clearly.

deep-dive
Sep 2, 2026
How to Write Death Tests in GoogleTest to Verify Process Termination

Learn to write GoogleTest death tests to verify process termination with abort exit or signals. Assert expected output from dying processes effectively.

how-to-guide
Sep 2, 2026
How to Define Type-Parameterized Tests in GoogleTest: 4 Macro Phases Explained

Learn how to define type-parameterized tests in GoogleTest using four key macros. Separate test patterns from type instantiation for efficient testing across multiple data types.

how-to-guide
Sep 2, 2026
How to Combine Multiple Parameter Generators for Cartesian Product Tests in GoogleTest

Learn to combine GoogleTest parameter generators with Combine() for Cartesian product tests. Instantiate tests for every permutation using INSTANTIATE_TEST_SUITE_P and std::tuple.

how-to-guide
Sep 2, 2026
How to Use Parameter Generators like Range and ValuesIn in GoogleTest: A Complete Guide

Master GoogleTest parameter generators like Range and ValuesIn for efficient data-driven testing. Enhance your TEST_P cases with lazy sequences of values using this comprehensive guide.

how-to-guide
Sep 2, 2026
How to Test Private Members of a Class Using GoogleTest

Learn how to test private members of a class with GoogleTest. Use the FRIEND_TEST macro for compile-time access to private methods and data without public exposure.

how-to-guide
Sep 2, 2026
How to Use Fixture Inheritance in GoogleTest: A Complete Guide

Master GoogleTest fixture inheritance to share setup teardown logic and helper functions across tests. This guide shows how to derive test fixtures for efficient C++ testing.

how-to-guide
Sep 2, 2026
How to Create Custom AssertionResult Objects in GoogleTest

Learn how to create custom AssertionResult objects in GoogleTest. Use factory functions and the << operator to stream diagnostic messages for clearer test feedback.

how-to-guide
Sep 2, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →