
Go Testing
Go test-writing guide that covers table-driven tests, subtests, helpers, and cmp.Diff assertions, with clear failure-message rules.
- CCM score
- 65 of 100
- skills.sh installs
- 1.5K
- GitHub stars
- 197
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers table-driven tests, subtests, parallel execution, test helpers, test doubles, and
cmp.Diffcomparisons - Enforces failure messages that name the function, inputs, and got/want values, with
gotprinted beforewant - Routes to bundled references, a
scripts/gen-table-test.shgenerator, and a table-test template as needed - Designed for writing or reviewing Go tests, and excludes benchmark performance testing (see go-performance)
Install
$ npx -y skills add cxuu/golang-skills --skill go-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Go Testing
Compatibility: Diff examples may use
github.com/google/go-cmp.
Resource Routing
scripts/gen-table-test.sh- Run when generating a table-driven test scaffold.assets/table-test-template.go- Use as a copyable table-test starting point.references/TABLE-DRIVEN-TESTS.md- Read when choosing table tests, subtests, or parallel test patterns.references/TEST-HELPERS.md- Read when writing helpers, fixtures, cleanup, or test doubles.references/TEST-ORGANIZATION.md- Read when structuring packages, black-box tests, or larger test suites.references/VALIDATION-APIS.md- Read when choosingt.Error,t.Fatal,cmp.Diff, or assertion style.references/INTEGRATION.md- Read when testing external services, HTTP handlers, databases, or long-running setup.
Quick Reference
Details
- Repository
- github.com/cxuu/golang-skills
- Categories
- Testing & QA, Go
- First seen
- May 16, 2026
More from cxuu/golang-skills
All 20- Go Error Handling1.4K
- Go Concurrency1.4K
- Go Interfaces1.4K
- Go Linting1.4K
- Go Style Core1.4K
- Go Documentation1.4K
- Go Context1.4K
- Go Performance1.4K
- Go Naming1.3K
- Go Defensive1.3K
- Go Packages1.3K
- Go Functional Options1.3K
- Go Data Structures1.3K
- Go Control Flow1.3K
- Go Logging1.1K
- Go Generics1.1K
- Go Functions1.1K
- Go Declarations1.1K
- Go Code Review1.8K
Similar to Go Testing
More Testing & QA
go-code-reviewcxuu/golang-skills1.8K installsGo code review checklist covering formatting, errors, naming, concurrency, interfaces, and security checks with tooling.
golang-testing-strategiesbobmatnyc/claude-mpm-skills466 installsGo testing guide covering table-driven tests, testify assertions, gomock interface mocking, benchmarks, and CI integration.
go-performancecxuu/golang-skills1.4K installsPerformance patterns for Go hot paths, covering conversions, allocation, string building, and benchmarking.
golang-stretchr-testifysamber/cc-skills-golang41.7K installsGo testing toolkit covering testify's assert, require, mock, and suite packages with usage rules.
golang-benchmarksamber/cc-skills-golang41.9K installsGo benchmarking workflow covering writing, running, profiling, and statistically comparing benchmarks with pprof and benchstat.