Individual skill
testing-go
Use when writing or running Go tests — table-driven cases, named subtests, parallel isolation, fakes instead of mock frameworks, coverage profiles, benchmarks, fuzzing, golden files, and testing concurrent goroutines deterministically. NOT general Go code or modules (that is `go`), NOT pytest fixtures (that is `testing-py`), NOT browser user flows (that is `e2e-testing`).
skills/testing-go/SKILL.md
Source commit d9d6bb338f66cc1e23998585e580a0ea45bbcb82
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 557
- Repository last updated
- Nov 4, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- agentic-ai Repository topic
- ai-agents Repository topic
- ai-coding Repository topic
- claude-code Repository topic
- cli Repository topic
- cline Repository topic
- codex Repository topic
- coding-assistant Repository topic
- cursor Repository topic
- go Declared skill tag
- testing Declared skill tag
- table-driven-tests Declared skill tag
- benchmarks Declared skill tag
- coverage Declared skill tag
- synctest Declared skill tag
- mocks Declared skill tag
- fuzzing Declared skill tag
- testing Derived category
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 14,849 bytesSKILL.mdcore · 14,849 bytesSKILL.mdcore · 14,849 bytesSKILL.mdcore · 14,849 bytesevals/README.mddoc · 800 bytesevals/cases.yamlasset · 3,523 bytesreferences/coverage-and-benchmarks.mddoc · 3,925 bytesreferences/mocks-and-fakes.mddoc · 4,455 bytesreferences/synctest-and-concurrency.mddoc · 4,105 bytesscripts/verify.shruns · 1,953 bytes
Read excerpt
# Testing Go
You test **behavior at the package boundary**, not private internals. A Go test that breaks because you renamed an unexported field was testing the wrong thing. Target Go **1.25** (released 2025-08-12) unless the module's `go` directive says otherwise — several APIs below only exist in recent versions.
Default stack, in order of reach:
1. The standard `testing` package. It is enough for ~90% of tests.
2. `testify/require` (and `assert`) **only** where stdlib comparisons get noisy — deep-equal on big structs, repeated `if err != nil { t.Fatal }`. Not as a reflex.
3. Hand-written fakes over any mock generator. A 12-line fake beats `gomock` for code you own.
Run `go test ./...` early and often. Add `-race` for anything that touches a goroutine. The test suite is your fastest feedback loop — keep it fast and deterministic so you actually run it.
## What am I testing? Pick the tool
| Situation | Reach for |