What problem does it solve?
Many Go projects suffer from brittle tests, low coverage, and inconsistent testing patterns that make maintenance and reliable refactoring difficult; this Skill provides clear, repeatable testing patterns and workflows to make tests dependable and maintainable.
Core Features & Use Cases
- Table-driven tests: Structured test cases for broad input coverage with minimal boilerplate.
- TDD workflow: RED-GREEN-REFACTOR guidance for writing tests first and iterating safely.
- Benchmarks & fuzzing: Patterns for performance measurement and property-based input fuzzing on Go 1.18+.
- Subtests, helpers, mocking, and golden files: Techniques for organizing related tests, simplifying setup/teardown, isolating dependencies with interfaces, and validating complex outputs.
- CI integration & coverage: Recommendations for coverage targets, profiles, and GitHub Actions integration to enforce quality gates.
Quick Start
Write a failing test for your Go function, run go test to observe the failure, implement the minimal code to pass, and iterate using the RED-GREEN-REFACTOR cycle.