golang-testing

Installation
Summary

Table-driven tests, subtests, benchmarks, fuzzing, and golden files for Go TDD workflows.

  • Covers the RED-GREEN-REFACTOR cycle with step-by-step examples for writing tests before implementation
  • Includes table-driven test patterns for comprehensive coverage, error cases, and parallel execution with t.Run()
  • Provides benchmarking techniques for performance analysis, memory allocation tracking, and comparative benchmarks across input sizes
  • Supports fuzzing with seed corpus and property-based testing for input validation (Go 1.18+)
  • Includes mocking via interfaces, HTTP handler testing with httptest, golden file comparisons, and coverage measurement strategies
SKILL.md

Go Testing Patterns

Comprehensive Go testing patterns for writing reliable, maintainable tests following TDD methodology.

When to Activate

  • Writing new Go functions or methods
  • Adding test coverage to existing code
  • Creating benchmarks for performance-critical code
  • Implementing fuzz tests for input validation
  • Following TDD workflow in Go projects

TDD Workflow for Go

The RED-GREEN-REFACTOR Cycle

RED     → Write a failing test first
GREEN   → Write minimal code to pass the test
Related skills
Installs
6.1K
GitHub Stars
179.7K
First Seen
Jan 27, 2026