What problem does it solve?
This Skill solves the problem of flaky, slow, and hard-to-maintain Go test suites by providing production-ready testing patterns that keep tests deterministic and behavior-focused.
Core Features & Use Cases
- Table-driven tests with named subtests: Ensures every scenario is documented via a
name field and executed through t.Run.
- Safe parallelism: Encourages
t.Parallel() for independent unit tests to keep runtimes low.
- Correct separation of integration tests: Uses
//go:build integration so integration code doesn’t compile or run during normal unit test runs.
- Concurrency robustness: Adds goroutine leak detection using
goleak and guidance for deterministic time/concurrency testing (e.g., testing/synctest).
- Testing completeness: Covers unit, integration, fuzzing, snapshots/artifacts, mocks/interfaces, and executable Examples.
Quick Start
Use the golang-testing skill to generate or review a set of Go tests for your package, including edge cases, named table cases, and an integration-test build-tag layout when your package touches external systems.