cpp-testing

Configure CMake projects with GoogleTest/CTest and diagnose flaky tests.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/contentbugvideoediting/cb-project-assistant --skill cpp-testing-contentbugvideoediting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/contentbugvideoediting/cb-project-assistant/tree/main/services/cb-s-claude/vendor/s-claude/skills-library/cpp-testing
Command: npx skills add https://github.com/contentbugvideoediting/cb-project-assistant --skill cpp-testing-contentbugvideoediting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining robust C++ tests can be error-prone and time-consuming; this skill standardizes test setup with GoogleTest/CTest, improving reliability and maintainability.

Core Features & Use Cases

  • Test development best practices: guidelines for writing stable unit and integration tests.
  • CI-ready configuration: streamlined integration with GoogleTest/CTest using CMake, enabling coverage and sanitizers.
  • Diagnosis & repair: techniques to diagnose flaky tests and quickly fix failures.

Quick Start

Configure a sample CMake project with GoogleTest/CTest and run the test suite to verify setup.

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 a C++ project?

Configure GoogleTest with CMake by linking the framework, registering test executables with CTest, and defining build rules to automate test discovery and execution within your C++ project.

What's the best way to diagnose and fix flaky C++ tests in CI?

Diagnose flaky C++ tests by applying standardized test development best practices and utilizing sanitizers to detect memory or concurrency issues causing intermittent failures in CI workflows.

Can I enable code coverage and sanitizers in a CMake-based C++ test suite?

Yes, you can enable code coverage and sanitizers in a CMake-based C++ test suite by applying specific build configuration flags to instrument binaries during the GoogleTest and CTest setup process.

Does this C++ testing approach require a CMake-based build environment?

Yes, standardizing C++ test setup with GoogleTest and CTest requires a CMake-based build environment to properly configure CI-ready workflows, enable coverage, and integrate sanitizers.

Why are my GoogleTest suites failing in CI pipelines?

GoogleTest suites may fail in CI pipelines due to non-standardized configurations; applying CI-ready CMake setups and test development best practices ensures reliability and quickly diagnoses failures.

When do I need sanitizers for C++ unit and integration testing?

You need sanitizers for C++ unit and integration testing when diagnosing memory leaks or undefined behavior, applying build configurations that instrument code during CTest execution to catch runtime errors.