Cpp Testing
Test-writing workflow for C++ with GoogleTest, GoogleMock, CMake, and CTest, including coverage and sanitizers.
- CCM score
- 73 of 100
- skills.sh installs
- 13K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers TDD-style test writing, fixture and mock patterns, CTest discovery, and failure and flakiness debugging
- Includes code examples for gtest unit tests, fixtures, gmock mocks, and a CMake/CTest quickstart with
gtest_discover_tests() - Provides gcov/lcov and llvm-cov coverage recipes plus ASan, UBSan, and TSan options set as CMake flags
- Designed for C++17/20 projects that need deterministic, isolated tests and sanitizer-backed CI
Install
$ npx -y skills add affaan-m/ecc --skill cpp-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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.
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, CLI & Terminal
- First seen
- Jul 14, 2026
Questions
What does the cpp-testing skill help an agent do?
The cpp-testing skill guides an agent through writing, updating and fixing C++ tests with GoogleTest and GoogleMock, configuring CMake and CTest, diagnosing failing or flaky tests, and adding coverage or sanitizers. It follows a red, green, refactor test-driven loop for C++17 and C++20 code.
Which tests and tools does the cpp-testing skill cover?
It covers unit and integration tests, GoogleTest fixtures and mocks, CTest discovery through gtest_discover_tests, and coverage with gcov, lcov or llvm-cov. It also explains enabling AddressSanitizer, UndefinedBehaviorSanitizer and ThreadSanitizer for memory and race diagnostics.
How do I install the cpp-testing skill?
Run npx -y skills add affaan-m/ecc --skill cpp-testing -y inside your project. Once installed, the agent can use the skill when you ask it to work on C++ tests, GoogleTest or CTest setup, or flaky test failures.
Where does cpp-testing rank in its category?
The skill sits in the Testing & QA category and ranks in the top 50 there, alongside skills such as tdd and webapp-testing. Its focus is C++ specifically, with GoogleTest and CMake/CTest workflows.
More from affaan-m/ecc
All 257- Jpa Patterns13K
- Rust Patterns12.9K
- Kotlin Coroutines Flows12.9K
- Configure Ecc12.9K
- Laravel Tdd12.8K
- Agentic Engineering12.8K
- Clickhouse Io12.7K
- Cost Aware Llm Pipeline12.7K
- Kotlin Patterns12.7K
- Iterative Retrieval12.6K
- Django Verification12.6K
- Nextjs Turbopack12.6K
- Content Engine12.5K
- Springboot Verification12.5K
- Context Budget12.5K
- Nutrient Document Processing12.5K
- Autonomous Loops12.4K
- Architecture Decision Records12.4K
- Investor Materials12.4K
- Swiftui Patterns12.4K
- Pytorch Patterns12.3K
- Bun Runtime12.3K
- Ai First Engineering12.3K
- Flutter Dart Code Review12.2K
Similar to Cpp Testing
More Testing & QArust-testingaffaan-m/ecc14.8K installsRust testing patterns covering unit, integration, async, property-based, and mocked tests under a TDD workflow.
python-testingaffaan-m/ecc14.3K installsPytest testing patterns covering TDD, fixtures, parametrization, mocking, and coverage targets for Python projects.
python-testing-patternswshobson/agents41.5K installsComprehensive pytest guide covering fixtures, mocking, parameterization, and test-driven development workflows for Python.
tdd-guidealirezarezvani/claude-skills1.1K installsTest-first development skill that generates tests, mocks, and coverage analysis across Jest, Pytest, JUnit, Vitest, and Mocha.
coverage-analysistrailofbits/skills6.3K installsCoverage measurement that reveals which code a fuzzing campaign reaches and which blockers stall it.