What problem does it solve?
This Skill helps developers write, run, and debug Go tests, benchmarks, and fuzzers to detect regressions, concurrency bugs, and performance regressions early in development and CI pipelines.
Core Features & Use Cases
- Test patterns and conventions: guidance on table-driven tests, subtests, test file layout, and testdata/golden file conventions.
- Assertions and suites: when to use testify's assert versus require and how to structure testify suites for setup and teardown.
- Mocking and HTTP testing: interface-based hand-rolled mocks, testify/mock usage, and httptest server/recorder patterns for handler and client tests.
- Performance and fuzzing: how to write benchmarks that report allocations, run bench comparisons with benchstat, and seed and run fuzz tests with corpus management.
- Use Case: add comprehensive unit and integration tests for a web service, validate race conditions locally, and produce coverage and benchmark reports for CI-based regression detection.
Quick Start
Run the project's tests with race detection and coverage and generate an HTML coverage report.