๐Ÿงช Testing C++ with GoogleTest
Home Chapters Examples Diagrams Bibliography GitHub โ†—
Home / Tooling and workflow
Part 5 3 chapters

Tooling and workflow

Debugging failing tests, measuring coverage, and running the suite in CI.

Chapter 14

Debugging a failing test with GDB

Turn a red test into a located bug: run the test binary under GDB, isolate the case with a filter, stop in the function with a conditional breakpoint, and read the state with print, step, and backtrace.

35 minRead โ†’
Chapter 15

Measuring coverage with llvm-cov

See which lines and branches the suite actually runs: build instrumented with Clang's source-based coverage, report with llvm-cov, read line, region, and branch numbers, and know what coverage can and cannot tell you.

30 minRead โ†’
Chapter 16

CI and reproducible test runs

Wire the whole suite into one pipeline: a script that runs the default lane, both sanitizer lanes, and a coverage gate, and the GitHub Actions workflow that runs the same stages on every push, so local and CI results mean the same thing.

35 minRead โ†’
โ† Previous part Testing concurrency

Testing C++ with GoogleTest

A chaptered, runnable guide to testing modern C++ (C++20/23) with GoogleTest and GoogleMock on Fedora 44, from your first test to concurrency, sanitizers, and CI.

Tutorial

  • Chapters
  • Examples
  • Bibliography

Reference

  • GoogleTest docs โ†—
  • CMake docs โ†—
  • View on GitHub โ†—
  • Issues โ†—
Open source ยท Apache-2.0 (code) / CC BY 4.0 (prose) Last built 2026-11-11