
Cpp Testing
When you're writing or debugging C++ tests with GoogleTest and CMake, this skill keeps you honest about the TDD loop and test isolation. It covers the practical stuff: fixture setup, GMock for interaction testing, CTest discovery with gtest_discover_tests, and CMake config for sanitizers and coverage. The flaky test guardrails are good reminders (no sleeps, unique temp paths, deterministic seeds). What I like is the explicit scoping: it tells you not to use it for feature work or refactors unrelated to tests, which prevents scope creep. If you're working in a modern C++ codebase and need test discipline without the ceremony, this is a solid reference.
- skills.sh installs
- 5.6K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill cpp-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
C++ Testing (Agent Skill)
Agent-focused testing workflow for modern C++ (C++17/20) using GoogleTest/GoogleMock with CMake/CTest.
When to Use
- Writing new C++ tests or fixing existing tests
- Designing unit/integration test coverage for C++ components
- Adding test coverage, CI gating, or regression protection
- Configuring CMake/CTest workflows for consistent execution
- Investigating test failures or flaky behavior
- Enabling sanitizers for memory/race diagnostics
When NOT to Use
- Implementing new product features without test changes
- Large-scale refactors unrelated to test coverage or failures
- Performance tuning without test regressions to validate
- Non-C++ projects or non-test tasks
Core Concepts
- TDD loop: red → green → refactor (tests first, minimal fix, then cleanups).
- Isolation: prefer dependency injection and fakes over global state.
- Test layout:
tests/unit,tests/integration,tests/testdata. - Mocks vs fakes: mock for interactions, fake for stateful behavior.
- CTest discovery: use
gtest_discover_tests()for stable test discovery. - CI signal: run subset first, then full suite with
--output-on-failure.
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Category
- Testing & QA
More from affaan-m/everything-claude-code
All 256- Iterative Retrieval5.6K
- Agent Harness Construction5.5K
- Configure Ecc5.5K
- Nutrient Document Processing5.5K
- Search First5.5K
- Verification Loop5.5K
- Agentic Engineering5.4K
- Cost Aware Llm Pipeline5.4K
- Django Verification5.4K
- Springboot Verification5.4K
- Codebase Onboarding5.3K
- Deep Research5.3K
- Rust Testing5.3K
- Ai First Engineering5.2K
- Autonomous Loops5.2K
- Content Engine5.2K
- Content Hash Cache Pattern5.2K
- Kotlin Coroutines Flows5.2K
- Swiftui Patterns5.2K
- Investor Materials5.1K
- Laravel Tdd5.1K
- Regex Vs Llm Structured Text5.1K
- Compose Multiplatform Patterns5K
- Continuous Agent Loop5K