integration-testing

Generate Python integration tests for APIs and databases using Docker Compose.

17|1|Updated Jun 8, 2025
One-click install
npx skills add https://github.com/williamzujkowski/standards --skill integration-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-testing
Source: https://github.com/williamzujkowski/standards/tree/main/skills/testing/integration-testing
Command: npx skills add https://github.com/williamzujkowski/standards --skill integration-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill provides best practices for integration testing, ensuring that different components of your system (APIs, databases, microservices) work together seamlessly. It streamlines the process of verifying interactions, reducing integration bugs and improving system reliability.

Core Features & Use Cases

  • API Integration Testing: Guides on testing RESTful and GraphQL API endpoints and their interactions.
  • Database Integration Testing: Provides patterns for testing database interactions, including setup and teardown.
  • Contract Testing: Teaches how to use contract testing to ensure compatibility between services.
  • Use Case: Set up integration tests for your microservice, automatically generating a Docker Compose file for a test database and a Python script to test API endpoints and their database interactions.

Quick Start

Generate a Python integration test template for an API endpoint that interacts with a PostgreSQL database.

Frequently Asked Questions about integration-testing

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

FAQPage Schema
How do I test API and database interactions together in integration tests?

Integration testing validates end-to-end interactions across APIs, databases, and microservices by combining API testing with database verification. Use containerized environments like Testcontainers or Docker Compose to spin up real database instances, then write tests that exercise API endpoints and verify database state changes in isolation.

What's the best way to set up isolated test environments for microservices?

Containerized integration testing isolates each microservice's test environment using Docker Compose or Testcontainers, eliminating test dependencies and flakiness. This approach lets you spin up databases, mock services, and dependent components on demand, run tests in parallel, and tear down cleanly after each test suite.

Can I use contract testing to ensure services stay compatible?

Contract testing using Pact-based frameworks verifies that services honor their communication contracts without requiring full end-to-end integration. It generates contracts from consumer expectations, validates providers against those contracts, and catches breaking changes early in CI before deployment.

How do I test database migrations and schema changes reliably?

Integration testing with real containerized databases lets you apply migrations, verify schema correctness, and test data transformations in an isolated environment. Testcontainers automates database setup, runs migrations against the test instance, and validates that your application handles schema versions correctly.

Do I need to mock external APIs in integration tests?

API mocking within integration tests lets you control external service behavior, simulate error scenarios, and avoid test flakiness from real external dependencies. Combine mocking for unreliable or third-party services with real containerized databases and internal service instances for comprehensive integration coverage.

What's the difference between contract testing and full integration testing?

Contract testing validates bilateral agreements between services using pacts; integration testing validates actual end-to-end workflows across multiple components. Contract testing runs faster in CI, catches incompatibilities early, while integration testing verifies complete system behavior under realistic conditions.