What problem does it solve?
This Skill eliminates the overhead and unreliability of manual C++ test setup, flaky test behavior, and inconsistent test execution across local and CI environments for modern C++17/20 projects.
Core Features & Use Cases
- TDD Workflow Guidance: Follow the red-green-refactor loop to write reliable, isolated C++ tests with GoogleTest and GoogleMock.
- CMake/CTest Integration: Configure consistent test discovery and execution across development and CI pipelines.
- Debugging and Diagnostics: Troubleshoot failing or flaky tests, and enable coverage and sanitizer tooling for memory and race condition detection.
- Use Case: For a C++ backend service, use this Skill to write unit tests with mocked dependencies, integrate them into a CTest pipeline, and enable AddressSanitizer in CI to catch memory leaks before deployment.
Quick Start
Use the cpp-testing skill to write a GoogleTest unit test for your C++ Add function and configure CTest to run it in your CMake project.