go-integration-tests

Generates Go integration tests using testify/suite and itestkit for containerized databases.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/cristiano-pacheco/ai-tools --skill go-integration-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-integration-tests
Source: https://github.com/cristiano-pacheco/ai-tools/tree/main/skills/go-integration-tests
Command: npx skills add https://github.com/cristiano-pacheco/ai-tools --skill go-integration-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the creation of comprehensive Go integration tests, ensuring your application's components interact correctly with real infrastructure like databases and external services.

Core Features & Use Cases

  • Containerized Dependencies: Leverages itestkit to spin up real databases and other services for testing.
  • Testify Suite Integration: Follows testify/suite patterns for organized and maintainable test suites.
  • Use Case: When developing a new API endpoint that interacts with a PostgreSQL database, use this Skill to write integration tests that verify data persistence and retrieval against a live database instance managed by Docker.

Quick Start

Generate Go integration tests for the user registration use case using the provided example structure.

Frequently Asked Questions about go-integration-tests

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

FAQPage Schema
How do I write Go integration tests for applications using real databases?

To write Go integration tests for real databases, you generate test suites using testify/suite and itestkit. This approach spins up containerized infrastructure via Docker to verify end-to-end flows and assert database state.

What is the best way to structure integration tests in Go using testify?

The best way to structure integration tests in Go using testify is by following the testify/suite patterns. This method organizes tests into maintainable suites, ensuring specific naming conventions and deep assertion validation for comprehensive use case testing.

Can I use Docker to spin up database dependencies for Go integration tests?

Yes, you can use Docker to spin up database dependencies for Go integration tests. By leveraging the itestkit library, the testing process containerizes real databases and external services to validate data persistence and retrieval against live instances.

How does itestkit work with testify for testing use cases in Go?

Itestkit works with testify by managing containerized infrastructure while testify/suite organizes the test logic. Together, they generate Go integration tests that verify application components against real databases, asserting side effects and database state.

Do I need Docker to run Go integration tests with itestkit?

Yes, you need Docker to run Go integration tests with itestkit because the framework relies on containerization to spin up real databases and external services. This ensures tests validate use cases against live infrastructure instances.

When should I use Go integration tests instead of unit tests?

You should use Go integration tests instead of unit tests when you need to verify end-to-end flows and assert database state against real infrastructure. This approach ensures your application's components interact correctly with actual databases and external services.