go-test
Installation
SKILL.md
Go Testing Skill
This skill guides writing effective Go tests and objectively measuring their quality using mutation testing and coverage analysis.
Core Principle
Tests exist to catch bugs, not to hit coverage numbers. Use mutation testing to prove your tests actually detect real defects.
LLM Testing Failure Modes
Before writing tests, be aware of these common mistakes:
- Happy path tunnel vision: Test failure cases, not just success
- Testing implementation, not behavior: Tests should survive refactors
- Weak assertions: Don't just check
err == nil— verify the result - Mock addiction: Prefer real implementations over mocks when feasible
- No concurrency testing: Always run with
-race, test concurrent access - No adversarial thinking: Ask "what input would break this?"