cpp-testing

Automate C++ unit and integration testing with GoogleTest and CMake/CTest.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill cpp-testing-jamkris
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/cpp-testing
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill cpp-testing-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers implement, maintain, and validate C++ tests efficiently using GoogleTest/GoogleMock with CMake/CTest.

Core Features & Use Cases

  • TDD loop guidance: red → green → refactor for tests-first development.
  • Structured test layouts: tests/unit, tests/integration, tests/testdata with GoogleTest discovery and CI considerations.
  • Mocks vs fakes guidance and CI gating to ensure reliable test suites across projects.
  • Debugging, coverage, and sanitizers configurations to improve test robustness.

Quick Start

Set up the project with the included CMake/CTest configuration and run the test suite to validate your C++ components.

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 C++ unit testing?▼

C++ unit testing with GoogleTest requires CMake/CTest configuration to automate test discovery and execution across structured directories like tests/unit and tests/integration.

What is the best way to structure mock and fake patterns in C++ integration tests?▼

C++ integration tests benefit from separating mocks and fakes into tests/unit and tests/integration directories using GoogleMock for dependency isolation and reliable CI gating.

Can I use CTest to run GoogleTest integration tests with sanitizers?▼

CTest can run GoogleTest integration tests with optional sanitizers configured through CMake builds, detecting memory errors and improving test robustness during validation cycles.

Does this C++ testing workflow support test-driven development cycles?▼

This C++ testing workflow supports test-driven development cycles through structured red, green, and refactor loops, guiding developers to write tests before implementing components.

How do I organize test data for C++ unit and integration tests?▼

Organize test data in a dedicated tests/testdata directory alongside tests/unit and tests/integration, enabling efficient GoogleTest discovery and reliable CI gating.