table-driven-tests

Community

Standardize unit tests with table-driven patterns.

AuthorPremModhaOfficial
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Go table-driven tests standardize unit test structure across all microservices. Every handler, service method, and repository function uses table-driven tests with consistent naming, assertions, and mock setup.

Core Features & Use Cases

  • Standardized table-driven test scaffolding with per-case setup, t.Run subtests, t.Cleanup, and t.Parallel.
  • Clear naming conventions, error assertion patterns, and gomock integration for per-case mocks.
  • Use cases include validating multiple scenarios in a single test, verifying error paths, and maintaining deterministic outcomes.

Quick Start

Create a table-driven test by enumerating scenarios in a tests table and run go test to execute all cases.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: table-driven-tests
Download link: https://github.com/PremModhaOfficial/go-sdk-pipeline/archive/main.zip#table-driven-tests

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.