cpp-testing

Automate C++ test setup, execution, and maintenance with GoogleTest and CTest.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Blake-John/agent-config --skill cpp-testing-blake-john
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/Blake-John/agent-config/tree/main/.agents/skill_spec/cpp-testing
Command: npx skills add https://github.com/Blake-John/agent-config --skill cpp-testing-blake-john

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides engineers in writing, updating, and diagnosing C++ tests using GoogleTest/CTest, ensuring reliable builds and meaningful coverage.

Core Features & Use Cases

  • Establishes a repeatable, TDD-driven workflow for C++ projects.
  • Demonstrates how to configure CMake/CTest for discovery and reporting.
  • Covers test isolation, mocks/fakes, and basic test data patterns.

Quick Start

Set up a GoogleTest/CTest workflow for a C++ project and run the test suite to verify green builds.

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

Setting up GoogleTest with CMake and CTest involves configuring CMake for automated test discovery and reporting. This creates a repeatable TDD-driven workflow to run C++ unit and integration tests, ensuring reliable builds and meaningful coverage.

Does modern C++ testing with GoogleTest support sanitizers and fuzzing?

Modern C++ testing with GoogleTest supports sanitizers and fuzzing for C++17/20 projects. This integration helps identify memory errors and edge cases, ensuring test isolation and reliable builds within CMake and CTest-based pipelines.

What is the best way to integrate C++ unit tests into a CI pipeline?

The best way to integrate C++ unit tests into a CI pipeline is using a CMake/CTest-based pipeline with GoogleTest. This approach automates test discovery, execution, and coverage reporting, satisfying requirements for test isolation and continuous integration.

How do I maintain test isolation and use mocks in C++ GoogleTest?

To maintain test isolation and use mocks in C++ GoogleTest, apply basic test data patterns and utilize fakes. This Skill guides engineers in writing and updating tests to ensure isolated environments and reliable diagnostic outcomes.

Can I use CTest to manage TDD loops for C++17 and C++20 projects?

You can use CTest to manage TDD loops for C++17 and C++20 projects by automating test execution and discovery. This establishes a repeatable, TDD-driven workflow that verifies green builds and maintains meaningful code coverage.