cpp-testing

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

1|Updated May 12, 2026
One-click install
npx skills add https://github.com/Manvendra08/TradingBot --skill cpp-testing-manvendra08
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/Manvendra08/TradingBot/tree/main/_agent/skills/cpp-testing
Command: npx skills add https://github.com/Manvendra08/TradingBot --skill cpp-testing-manvendra08

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the common pain points of inconsistent C++ test setups, flaky test failures, and missing test coverage for modern C++17/20 projects using GoogleTest and CMake/CTest.

Core Features & Use Cases

  • TDD Workflow Guidance: Provides a clear red-green-refactor loop for writing reliable, maintainable C++ tests.
  • GoogleTest/CTest Configuration: Includes ready-to-use CMake snippets for test discovery, coverage tracking, and sanitizer integration.
  • Test Reliability & Debugging: Offers guardrails for fixing flaky tests, enabling memory and race sanitizers, and designing isolated, deterministic test cases.
  • Use Case: A C++ developer building a high-performance trading engine can use this Skill to quickly set up a test suite, write unit tests for new pricing logic, and configure CI to run tests with AddressSanitizer to catch memory leaks.

Quick Start

Use the cpp-testing skill to write a GoogleTest unit test for your new C++ function and configure CMake to run it via CTest.

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?

Configuring GoogleTest with CTest uses ready-to-use CMake snippets for test discovery, execution, and CI-ready test configuration in modern C++17/20 projects.

What is the best way to find memory leaks and race conditions in C++ unit tests?

Finding memory leaks and race conditions in C++ tests is achieved by enabling sanitizer diagnostics, specifically AddressSanitizer, to catch memory errors and thread race conditions during test execution.

Can I use TDD to write isolated and deterministic C++ tests for new logic?

Yes, TDD-aligned test development provides a clear red-green-refactor loop for writing reliable, maintainable, isolated, and deterministic C++ test cases for new application logic.

Why does my C++ test suite have flaky test failures and missing test coverage?

Flaky test failures and missing coverage stem from inconsistent C++ test setups, which can be resolved using guardrails for fixing flaky tests, designing isolated tests, and adding code coverage tracking.

Does this C++ testing workflow support modern C++17 and C++20 standards?

Yes, the C++ testing workflow explicitly targets modern C++17 and C++20 projects, ensuring GoogleTest and CMake/CTest configurations align with modern language features and standards.