What problem does it solve?
This Skill helps developers write, configure, and debug C++ unit and integration tests using GoogleTest/GoogleMock and CMake/CTest to reduce time spent diagnosing failures, flaky tests, and CI test regressions.
Core Features & Use Cases
- Test authoring & TDD: guidance for the red → green → refactor loop, test layout, fixtures, and when to choose mocks versus fakes.
- Build and CI integration: instructions to integrate gtest_discover_tests with CTest, configure CMake test targets, and gate suites in CI.
- Diagnostics & hardening: steps to enable ASan/UBSan/TSan, collect coverage with gcov/lcov or llvm-cov, and guardrails for flaky tests.
- Use Case: Add a unit test for a failing parser, reproduce the failure locally with sanitizers enabled, and add a CI job that runs the fixed test suite and uploads coverage.
Quick Start
Build the project with CMake in Debug, enable AddressSanitizer, run the failing GoogleTest via ctest or the test binary, and report the failing assertion and stack trace.