testing

Automate canonical Go service testing with table-driven tests and real database verification.

6|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/vmkteam/claude-plugins --skill testing-vmkteam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/vmkteam/claude-plugins/tree/main/plugins/developer/skills/testing
Command: npx skills add https://github.com/vmkteam/claude-plugins --skill testing-vmkteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill standardizes testing practices for Go services by codifying canonical patterns, reducing boilerplate, and avoiding flaky, mocked tests.

Core Features & Use Cases

  • Canonical testing style using t.Run and testify's assert and require
  • Table-driven tests to cover multiple scenarios with clear structure
  • Real database integration tests that exercise actual DB interactions without mocks
  • TestMain/setup and teardown guidance to manage test databases and environment
  • Clear conventions for test organization and naming across packages

Quick Start

Run all tests with make test to execute unit and DB tests.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I write table-driven tests in Go using testify and t.Run?

Table-driven tests in Go use t.Run to execute subtests for each scenario, applying testify's assert and require to validate outcomes. This structure cleanly covers multiple test cases while maintaining reliable execution and reducing boilerplate.

What is the best way to run real database integration tests in Go without mocks?

Real database integration tests in Go exercise actual DB interactions without mocks to prevent flaky results. You manage test databases and environment state using TestMain setup and teardown guidance to ensure reliable end-to-end verification.

How does TestMain setup and teardown work for Go test databases?

TestMain setup and teardown manages Go test databases by initializing the environment before tests run and cleaning it up afterward. This ensures real database integration tests execute against a reliable, isolated state without requiring mocks.

Can I use this testing approach for any Go backend service?

This canonical testing approach applies to Go-based backends requiring reliable end-to-end testing with real databases. It enforces non-mocking tests, table-driven patterns, and clear organization using t.Run and testify across packages.

Why should I avoid mocking databases in Go end-to-end tests?

Avoiding mocking in Go end-to-end tests prevents flaky, inaccurate results by exercising actual database interactions. Canonical testing practices enforce real DB verification to guarantee your service behaves correctly under true integration conditions.

How do I organize Go test cases across multiple packages with consistent naming?

Organize Go test cases across packages by following clear conventions for test structure and naming. This canonical testing skill provides guidance on test organization, dependencies, and lifecycle management to standardize practices and reduce boilerplate.