
Cpp Testing
This one kicks in whenever you're writing C++ tests with GoogleTest or debugging why they're failing. It walks through TDD workflows (red, green, refactor), gives you GMock examples for interaction testing, and shows the CMake boilerplate to wire up CTest properly. The coverage and sanitizer sections are genuinely useful if you're trying to catch memory bugs or get CI gating right. The flaky test guardrails are the kind of thing you learn the hard way, so having them written down helps. It's opinionated about structure (tests/unit, dependency injection over globals) but in a way that keeps test suites maintainable as they grow.
- skills.sh installs
- 5.8K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --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/ecc
- Categories
- Testing & QA, Documentation
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Django Tdd5.8K
- Dashboard Builder5.7K
- Redis Patterns5.7K
- Eval Harness5.7K
- Manim Video5.7K
- Content Engine5.7K
- Springboot Tdd5.7K
- Motion Patterns5.7K
- Configure Ecc5.7K
- Token Budget Advisor5.7K
- Investor Materials5.7K
- Agent Introspection Debugging5.7K
- Laravel Verification5.7K
- Marketing Campaign5.7K
- Motion Foundations5.7K
- Kotlin Testing5.7K
- Ai Regression Testing5.7K
- Dart Flutter Patterns5.7K
- Mysql Patterns5.7K
- Production Audit5.7K
- Documentation Lookup5.7K
- Make Interfaces Feel Better5.7K
- Windows Desktop E2e5.7K
- Motion Advanced5.6K