cpp-testing

Create and debug C++ tests with GoogleTest, CTest, and CMake.

19|4|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/j7-dev/everything-github-copilot --skill cpp-testing-j7-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-testing
Source: https://github.com/j7-dev/everything-github-copilot/tree/main/docs/ja-JP/skills/cpp-testing
Command: npx skills add https://github.com/j7-dev/everything-github-copilot --skill cpp-testing-j7-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation, updating, and debugging of C++ tests, ensuring robust and reliable software development through effective testing strategies.

Core Features & Use Cases

  • Test Creation & Modification: Write new unit and integration tests or refactor existing ones.
  • Framework Integration: Set up GoogleTest/CTest with CMake for seamless testing.
  • Debugging & Diagnostics: Identify and fix failing or flaky tests, and enable sanitizers for deeper analysis.
  • Coverage & CI: Implement test coverage and configure CI gating for regression protection.

Quick Start

Use the cpp-testing skill to create a new GoogleTest for the Add function in src/add.cpp.

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 integrate CTest as the test runner and configure your CMakeLists.txt to discover and register tests, enabling seamless execution of unit and integration tests.

Can I use sanitizers to debug flaky C++ unit tests?

Yes, you can enable sanitizers for deeper diagnostic analysis when debugging flaky C++ tests, helping identify memory errors and undefined behavior that cause test failures.

What's the best way to add test coverage and CI gating to a C++ testing workflow?

The best way to add test coverage and CI gating is to implement coverage tracking in your test suite and configure CI pipelines to block regressions, ensuring robust software reliability.

How do I write a new GoogleTest for an existing function in C++?

You write a new GoogleTest by creating a test fixture or test case that targets the specific function, modifying the test suite to validate expected inputs and outputs for reliable execution.

Does this C++ testing workflow support both unit and integration tests?

Yes, the C++ testing workflow fully supports the creation, modification, and debugging of both unit and integration tests using GoogleTest and CMake integration.