cpp-testing

Configure GoogleTest and CTest workflows for C++17/20 projects.

Updated May 9, 2026
One-click install
npx skills add https://github.com/RambleRainbow/jd --skill cpp-testing-ramblerainbow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/RambleRainbow/jd/tree/main/.claude/skills/cpp-testing
Command: npx skills add https://github.com/RambleRainbow/jd --skill cpp-testing-ramblerainbow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

C++ testing workflows are often inconsistent, with fragmented setup for GoogleTest/CTest, unreliable detection of failing or flaky tests, and missing integration for code coverage and sanitizers that slows development and reduces code reliability.

Core Features & Use Cases

  • End-to-end TDD support: Guides the full red-green-refactor loop for writing, fixing, and refactoring C++ tests.
  • CMake/CTest configuration: Provides templates and best practices for consistent test discovery and CI execution.
  • Diagnostics and guardrails: Includes workflows for debugging failing tests, adding code coverage, enabling memory/race sanitizers, and preventing flaky test behavior.
  • Use case: For a team struggling with intermittent test failures in a C++20 codebase, use this skill to configure sanitizers, isolate flaky tests, and set up CI gating to block regressions.

Quick Start

Use the cpp-testing skill to configure GoogleTest with CMake, write a passing unit test for your C++ add function, and set up CTest to run the test suite with AddressSanitizer enabled in your CI pipeline.

Frequently Asked Questions about cpp-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure GoogleTest with CMake and CTest for my C++ project?

Configure GoogleTest with CMake and CTest by using provided templates for consistent test discovery and CI execution. This setup streamlines C++ test writing and ensures deterministic test execution across modern C++17/20 codebases.

What is the best way to debug flaky C++ unit tests in CI?

Debug flaky C++ unit tests by utilizing diagnostic workflows to isolate intermittent failures and enabling memory or race sanitizers. This approach prevents flaky behavior and establishes CI gating to block regressions reliably.

How do I add code coverage to a CMake CTest pipeline?

Add code coverage to a CMake CTest pipeline by applying built-in diagnostics and guardrails for test execution. This integration measures test coverage accurately and enforces regression protection within your C++ codebase.

Can I enable AddressSanitizer for GoogleTest runs in CTest?

You can enable AddressSanitizer for GoogleTest runs in CTest to detect memory errors during test execution. The skill provides specific workflows for activating memory and race sanitizers within your CI pipeline.

Does this support Test Driven Development for C++20 codebases?

It fully supports Test Driven Development for C++20 codebases by guiding the complete red-green-refactor loop. This ensures TDD adherence and reliable regression protection while writing and fixing unit tests.

Why are my C++ unit tests failing intermittently during CI execution?

C++ unit tests fail intermittently often due to undetected memory leaks or race conditions. Use configured sanitizers and test isolation workflows to debug failing tests and prevent flaky behavior in your CI pipeline.