What problem does it solve?
This skill helps teams quickly write, fix, and stabilize C++ unit and integration tests so that regressions are caught early and intermittent failures are diagnosed effectively.
Core Features & Use Cases
- Test authoring and repair: Guidance for writing focused GoogleTest/GoogleMock tests and repairing failing assertions with minimal production changes.
- Build and CI integration: Instructions to configure CMake and CTest for stable test discovery and CI-friendly runs, including segmentation of unit vs integration tests.
- Diagnostics and quality gates: Steps to enable AddressSanitizer/UBSan/TSan, collect coverage, and run targeted test subsets to triage flaky or environment-dependent failures.
- Use case: Add a new unit test for a C++17 component, wire it into CMake with gtest_discover_tests, run ctest to reproduce the failure, enable ASan for memory issues, and submit a minimal fix with coverage verification.
Quick Start
Run a focused failing test locally, add or modify a GoogleTest case to capture the desired behavior, update CMake to discover and build the test, and run ctest to verify the fix.