go-integration-tests

Installation
SKILL.md

Go Integration Tests

Generate comprehensive Go integration tests using testify suite patterns with real database and infrastructure dependencies.

When to Use

  • Test use cases against real databases via containers
  • Verify end-to-end flows with real infrastructure
  • Assert DB state, side effects, and error conditions

Planning Phase

Before writing tests, identify:

  1. Test Location: Tests go in test/integration/ mirroring the source path from internal/
    • Example: internal/modules/identity/usecase/user/user_register_usecase.gotest/integration/modules/identity/usecase/user/user_register_usecase_test.go
  2. Dependencies: Identify real dependencies (database, redis) vs mocked ones (email, external APIs, metrics)
  3. Test Cases: Define scenarios covering happy paths, edge cases, error conditions, and DB state verification
  4. Naming: Use descriptive names: TestExecute_ValidInput_ReturnsUser, TestExecute_DuplicateEmail_ReturnsError
Related skills
Installs
15
First Seen
Feb 15, 2026