golang-testing

Teaches idiomatic Go testing patterns including table-driven tests, benchmarks, and fuzzing.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/MBarry01/dousell-immo --skill golang-testing-mbarry01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-testing
Source: https://github.com/MBarry01/dousell-immo/tree/main/.claude/skills/golang-testing
Command: npx skills add https://github.com/MBarry01/dousell-immo --skill golang-testing-mbarry01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers often struggle to write maintainable and robust tests. This Skill teaches reliable, idiomatic Go testing patterns such as table-driven tests, subtests, benchmarks, fuzzing, and a practical TDD workflow to improve test quality.

Core Features & Use Cases

  • Table-Driven Tests: standardizes multiple scenarios in a compact form.
  • Subtests and Parallelism: organizes related tests and speeds up execution.
  • Benchmarks and Performance: demonstrates how to measure and optimize code.
  • Fuzzing and Property-Based Testing: explores edge cases and robustness for input handling.
  • Use Case: validate new features with a test suite that exercises normal and edge cases to prevent regressions.

Quick Start

Run go test ./... to execute the complete Go test suite and verify behavior.

Frequently Asked Questions about golang-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write subtests and run them in parallel in Go?

Subtests in Go organize related test cases logically and enable parallel execution to speed up test runs. They structure tests hierarchically, making it easier to pinpoint failures across different scenarios.

Can I use Go benchmarks to measure and optimize code performance?

Benchmarks in Go measure and optimize code performance by executing functions repeatedly. They provide timing data to identify bottlenecks, helping developers optimize critical paths within their Go projects.

What is the best way to structure a TDD workflow in Go?

A practical TDD workflow in Go involves writing tests before implementation, structuring them with table-driven patterns, and enforcing best practices for naming and coverage across unit and integration scenarios.

Why does my Go test suite have poorly structured or hard to maintain tests?

Go tests become hard to maintain without idiomatic patterns. Enforcing best practices for test structure, naming, and coverage using table-driven tests and subtests ensures reliability and prevents regressions.