qa-go

Test Go backend applications with unit, integration, and middleware patterns.

3|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/endorphin-ai/claude-code-teams --skill qa-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qa-go
Source: https://github.com/endorphin-ai/claude-code-teams/tree/main/go-react-team/.claude/skills/qa-go
Command: npx skills add https://github.com/endorphin-ai/claude-code-teams --skill qa-go

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing, running, and maintaining comprehensive tests for Go backend applications, ensuring code quality and reliability.

Core Features & Use Cases

  • Unit Testing: Write unit tests for handlers, services, and repositories using standard Go testing tools and testify.
  • Integration Testing: Perform integration tests with database mocks (sqlmock) and real database instances (testcontainers).
  • Mocking: Generate mock implementations for interfaces using testify/mock.
  • Use Case: When developing a new API endpoint, use this Skill to generate unit tests for the handler, service, and repository layers, ensuring all success and error paths are covered.

Quick Start

Use the qa-go skill to write unit tests for the user service.

Frequently Asked Questions about qa-go

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

FAQPage Schema
How do I write unit tests for Go backend handlers and services?

Write unit tests for Go backend handlers and services using standard Go testing tools alongside testify. This framework supports table-driven tests and focuses on testing behavior at interface boundaries to ensure high code coverage across all success and error paths.

What's the best way to set up integration tests for Go repositories?

Set up integration tests for Go repositories using sqlmock for database mocks and testcontainers for real database instances. This approach validates repository layer behavior by testing against both mocked SQL interactions and actual database environments.

How does mocking work for Go interface boundaries in testing?

Mocking for Go interface boundaries works by generating mock implementations using testify/mock. This allows you to isolate and test behavior at service and repository boundaries without relying on actual external dependencies or database connections.

Can I use httptest with table-driven tests for Go API endpoints?

Yes, you can use httptest with table-driven tests for Go API endpoints. This combination allows you to systematically test HTTP handlers by defining multiple input and expected output scenarios within a single test function.

When do I need testcontainers versus sqlmock for Go backend testing?

Use testcontainers when you need integration tests against real database instances, and use sqlmock when you need unit tests that mock database interactions. Testcontainers validates actual database behavior while sqlmock isolates repository layer logic.