What problem does it solve?
This skill eliminates the manual guesswork and inconsistent practices involved in writing reliable C++ tests, configuring test runners, and diagnosing flaky or failing test cases, saving developers hours of debugging and rework.
Core Features & Use Cases
- TDD-aligned test development: Follow red-green-refactor loops to write robust unit and integration tests for C++17/20 code using GoogleTest and GoogleMock.
- CMake/CTest workflow configuration: Set up automated test discovery and execution for consistent local and CI pipeline runs.
- Test hardening and diagnostics: Add memory and race sanitizers, implement code coverage tracking, and resolve flaky test behavior with proven guardrails.
Use case example: If you are developing a C++ math library and need to add regression tests for a new vector calculation function, this skill guides you through writing the test, configuring CTest to run it automatically, and setting up coverage to track test effectiveness.
Quick Start
Use the cpp-testing skill to write a GoogleTest unit test for your C++ string parser function and configure CTest to run it as part of your build.