integration-test

Design integration tests for APIs, databases, and message queues with fixtures and CI pipelines.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill integration-test-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-test
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/07-testing-quality/integration-test
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill integration-test-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unit tests alone cannot verify that components work together correctly, leaving bugs in database queries, API contracts, and queue processing undetected until production. ## Core Features & Use Cases - Test Environment Setup: Spin up real PostgreSQL and Redis dependencies using Docker Compose or testcontainers for realistic testing. - Fixture & Data Management: Create isolated test data with factory patterns, SQL fixtures, and transaction rollback to prevent test pollution. - External API Mocking: Stub third-party services with responses, WireMock, or sandbox environments like Stripe test mode. - Use Case: You are building an order API backed by PostgreSQL and Redis. Use this Skill to design pytest integration tests that verify order creation updates inventory, runs against a real database in CI, and completes in under two minutes. ## Quick Start Ask the AI to design integration tests for your FastAPI order service with PostgreSQL and Redis, including fixtures, mocking, and a GitHub Actions workflow.

Frequently Asked Questions about integration-test

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

FAQPage Schema
How do I write integration tests with pytest and a real database?

Use pytest fixtures to create a test database session, override FastAPI dependencies with TestClient, and seed data per test. Wrap each test in a transaction that rolls back afterward so tests stay isolated and leave no data behind.

What is the difference between Docker Compose and testcontainers for testing?

Docker Compose defines a static test environment in a YAML file that you start before running tests. Testcontainers launches PostgreSQL or Redis containers programmatically inside pytest fixtures, giving dynamic lifecycle control per test session.

How do I mock external APIs like Stripe in integration tests?

Use the responses library to intercept HTTP calls and return stubbed JSON, or run WireMock as a fake server. Alternatively, test against sandbox environments such as Stripe test mode with test API keys and test card tokens.

How do I prevent integration tests from polluting the database?

Wrap each test in a transaction that rolls back after completion, or drop and recreate tables between tests. Always use a separate test database, never development or production databases.

How do I run integration tests in GitHub Actions CI?

Define PostgreSQL and Redis as job services with health checks, set DATABASE_URL and REDIS_URL environment variables, then run pytest with coverage. Trigger the workflow on every pull request to catch integration issues early.

When should I use integration tests instead of unit tests?

Use integration tests to verify database queries, API contracts, queue processing, and cache invalidation between components. Follow the test pyramid: roughly 60% unit tests, 30% integration tests, and 10% end-to-end tests.