Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aiskillstore/golang-testing
Comprehensive Go testing patterns including table-driven tests, mocking, integration testing, benchmarks, and test organization.
Passed 19 of 22 test cases with the skill, and 19 of 22 without it.
1 fixed18 passed either way2 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
Write the signature and structure for a Go per-test setup helper `setupService(t *testing.T)` that initializes a service and provides resource cleanup to the calling test.
| Checked | Without skill | With skill |
|---|---|---|
| Returns a cleanup closure function alongside the initialized service instance | Missed | Passed |
The instructions your model reads when the skill loads.
This skill provides guidance on comprehensive testing strategies for Go applications including unit tests, integration tests, benchmarks, and test organization.
func TestAdd(t *testing.T) {
tests := []struct {
name string
a, b int
expected int
}{
{"positive numbers", 2, 3, 5},
{"negative numbers", -2, -3, -5},
{"mixed numbers", -2, 3, 1},
{"zeros", 0, 0, 0},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := Add(tt.a, tt.b)
if result != tt.expected {
t.Errorf("Add(%d, %d) = %d; want %d", tt.a, tt.b, result, tt.expected)
}
})
}
}
test cases passed, vs 19 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.