Command Palette

Search for a command to run...

Назад к скиллам
скилл № 27728

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от 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:

  1. Container lifecycle management (start, wait, cleanup)
  2. Test data setup and cleanup strategies
  3. External service stubs/mocks
  4. 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

  1. Identify interaction points: Map all component boundaries (database, API, message queue, external services)
  2. Select integration strategy: For each dependency, decide real (containerized) vs simulated (WireMock). Use real for your own infrastructure, simulated for external services
  3. Configure containers: Set up TestContainers with appropriate wait strategies, connection strings, and lifecycle hooks
  4. Design test data: Create factory functions for test entities. Plan data setup and cleanup strategies
  5. Implement service stubs: Configure WireMock/MockServer for external services based on contracts
  6. Write integration tests: Structure with beforeAll (containers), beforeEach (data setup), test (AAA), afterEach (cleanup), afterAll (container stop)
  7. Test error paths: Include timeouts, network failures, validation errors, auth failures, and resource exhaustion
  8. Optimize execution: Parallelize container startup, share containers across suites, configure appropriate timeouts
  9. Integrate CI: Configure Docker-in-Docker, pre-pull images, set generous timeouts, parallelize test execution
  10. 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

  1. 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
  2. No data cleanup: Tests that leave data behind cause non-deterministic failures in subsequent tests. Implement truncation, delete-by-run-id, or fresh containers
  3. Hardcoded connection parameters: Hardcoded ports, hosts, or credentials prevent parallel execution. Use dynamic ports and environment-aware configuration
  4. 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)
  5. Over-mocking external services: Stubbing every possible response creates brittle tests that don't ref
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • 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), без исполняемых скриптов.

Похожие скиллы

Сравнить quality-integration-testing с