cpp-testing

Automate C++ test setup and execution with GoogleTest and CTest in CMake projects.

1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/aayushsoam/clawbot-plus --skill cpp-testing-aayushsoam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/aayushsoam/clawbot-plus/tree/main/skills/cpp-testing
Command: npx skills add https://github.com/aayushsoam/clawbot-plus --skill cpp-testing-aayushsoam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the setup, execution, and maintenance of C++ tests using GoogleTest/CTest within modern CMake projects, enabling reliable testing workflows.

Core Features & Use Cases

  • Unit and integration testing with GoogleTest across CMake builds.
  • CI-ready test discovery via CTest, fixtures, mocks, and coverage instrumentation.
  • Sanitizers and diagnostics: enable AddressSanitizer/UBSan/TSan for memory and concurrency issues.

Quick Start

Ask the agent to set up a GoogleTest/CTest workflow for your C++ project and run the tests.

Frequently Asked Questions about cpp-testing

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

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

To set up GoogleTest with CMake, you configure your CMakeLists.txt to discover and register test executables. CTest then automates execution, handles test discovery, and integrates fixtures and mocks for reliable C++ unit testing workflows.

What is the best way to run C++ unit tests with sanitizers in CI?

Running C++ unit tests with sanitizers in CI involves configuring AddressSanitizer, UBSan, or TSan within your CMake build. This validates memory and concurrency issues across C++17/20 code, ensuring deterministic test runs and reproducible reporting.

Can I use CTest for automated test discovery and coverage instrumentation?

Yes, CTest supports automated test discovery for GoogleTest executables within modern CMake projects. You can configure coverage instrumentation to validate code paths and generate reproducible reports for your C++17/20 test suites.

Does GoogleTest work with C++17 and C++20 builds?

GoogleTest works with C++17 and C++20 builds within modern CMake projects. It supports unit and integration testing, enabling development teams to apply fixtures, mocks, and sanitizers while maintaining deterministic and reproducible test runs.

Why are my CTest results non-deterministic when running GoogleTest suites?

Non-deterministic CTest results often stem from missing test fixtures or unaddressed concurrency issues. Applying GoogleTest fixtures, mocks, and sanitizers like TSan ensures deterministic test runs and validates memory and concurrency behavior across your C++ code.