quality-integration-testing
Use when the user asks about integration tests, API tests against a real database, Testcontainers, WireMock, component tests of a service or testing…
от j4flmao★ 47 звёзд на GitHub
Установить quality-integration-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Integration Testing
Purpose
Design and implement integration tests that verify components work together: API integration, database integration, external service mocking, and containerized infrastructure for realistic environments. This skill covers test architecture, container lifecycle management, data strategies, and CI integration.
Agent Protocol
Trigger
User mentions integration testing, component testing, API testing, database testing, TestContainers, WireMock, service-level testing, or inter-component verification.
Input Context
- Components/services under test and their interaction patterns
- Infrastructure dependencies (databases, message queues, caches)
- External service integrations
- Existing test suite and coverage levels
- CI environment capabilities (Docker availability)
Output Artifact
Integration test suite with containerized infrastructure, service virtualization, and CI configuration.
Response Format
Structured integration test files with:
- Container lifecycle management (start, wait, cleanup)
- Test data setup and cleanup strategies
- External service stubs/mocks
- CI pipeline configuration with parallel execution
Completion Criteria
- All component interactions tested with real (containerized) infrastructure
- External services simulated with WireMock or similar
- Database state management strategy defined (truncation, rollback, or fresh containers)
- CI integration configured with Docker-in-Docker and parallel execution
- Error paths tested (timeouts, failures, validation errors)
Workflow
- Identify interaction points: Map all component boundaries (database, API, message queue, external services)
- Select integration strategy: For each dependency, decide real (containerized) vs simulated (WireMock). Use real for your own infrastructure, simulated for external services
- Configure containers: Set up TestContainers with appropriate wait strategies, connection strings, and lifecycle hooks
- Design test data: Create factory functions for test entities. Plan data setup and cleanup strategies
- Implement service stubs: Configure WireMock/MockServer for external services based on contracts
- Write integration tests: Structure with beforeAll (containers), beforeEach (data setup), test (AAA), afterEach (cleanup), afterAll (container stop)
- Test error paths: Include timeouts, network failures, validation errors, auth failures, and resource exhaustion
- Optimize execution: Parallelize container startup, share containers across suites, configure appropriate timeouts
- Integrate CI: Configure Docker-in-Docker, pre-pull images, set generous timeouts, parallelize test execution
- Monitor flakiness: Track flaky tests, investigate infrastructure-related failures, quarantine non-deterministic tests
Architecture / Decision Trees
Dependency Strategy Decision Tree
Is this dependency your own service/infrastructure?
├── YES → Use real (containerized) for testing
│ ├── Database → TestContainers (PostgreSQL, MySQL, etc.)
│ ├── Message queue → TestContainers (Kafka, RabbitMQ)
│ ├── Cache → TestContainers (Redis)
│ └── Object storage → TestContainers (MinIO)
└── NO → Is it a third-party external service?
├── YES → Simulate with WireMock (contract-based stubs)
└── NO → Is it an infrastructure provider (AWS, GCP)?
├── YES → Use LocalStack or similar emulator
└── NO → Is it a library with side effects?
├── YES → Mock at adapter boundary
└── NO → Real implementation
Container Lifecycle Decision Tree
How many test suites share this service?
├── One suite → Start/stop per suite (beforeAll/afterAll)
└── Multiple suites → Can they share?
├── YES → Singleton container pattern (shared across suites)
└── NO → Start/stop per suite
Is state isolation critical?
├── YES → Fresh container per test class
└── NO → Data cleanup between tests (truncation)
Does CI support Docker?
├── YES → Testcontainers against the runner's Docker daemon (GitHub-hosted Linux runners have Docker)
└── NO → Embedded services or mocked infrastructure
Common Pitfalls
- In-memory database substitutes: H2/SQLite are not PostgreSQL/MySQL — different SQL dialect, constraints, and transaction behavior. Always use the real database in a container
- No data cleanup: Tests that leave data behind cause non-deterministic failures in subsequent tests. Implement truncation, delete-by-run-id, or fresh containers
- Hardcoded connection parameters: Hardcoded ports, hosts, or credentials prevent parallel execution. Use dynamic ports and environment-aware configuration
- Missing wait strategies: Tests that access containers before they're ready fail intermittently. Always use proper wait strategies (log message, HTTP health check, port listening)
- Over-mocking external services: Stubbing every possible response creates brittle tests that don't ref
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/api-testing.md
- references/containerized-testing.md
- references/contract-driven.md
- references/database-testing.md
- references/integration-testing-advanced.md
- references/integration-testing-architecture.md
- references/integration-testing-fundamentals.md
- references/integration-testing-strategy.md
- references/messaging-testing.md
- references/test-containers.md
- references/testcontainers-deep-dive.md
FAQ
Что делает скилл quality-integration-testing?
Use when the user asks about integration tests, API tests against a real database, Testcontainers, WireMock, component tests of a service or testing repositories and queues. Produces integration test setup with isolated dependencies. Not for unit tests with mocks (use quality-unit-testing) or Pact contracts (use quality-contract-testing).
Как установить скилл quality-integration-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл quality-integration-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…