Codex Write Go Table-Driven Tests with Named Subtests
Use the standard Go test framework to make boundary cases and failures easy to reproduce.
中文Install in Codex
Use a Go module, Go toolchain, and a function that can be tested locally.
- Copy the pinned `.kiro/skills/golang-testing/` directory into `.agents/skills/golang-testing/` in the project.
- Tell Codex the function and existing test style, and ask for normal, empty, and boundary cases first.
Example task
Add named cases for leading and trailing spaces, an empty string, all spaces, and an already-normalized label in a local `NormalizeLabel` test.What to check
A failed case shows its name and actual result, and `go test ./...` can rerun the package suite.
Original SKILL.md on GitHub · Updated
Frequently asked question
When is t.Parallel appropriate for subtests?
Check that cases do not share mutable state, environment settings, or execution order before enabling parallel execution.