Configure integration tests

From laurigates/claude-plugins · View interactive version

Configure integration tests is an AI agent skill from the GitHub repository laurigates/claude-plugins. Integration testing: Supertest, pytest, Testcontainers. Use when setting up integration tests, creating docker-compose.test.yml, or separating from unit tests.

How to use this skill

Skill file

/configure:integration-tests

Check and configure integration testing infrastructure for testing service interactions, databases, and external dependencies.

When to Use This Skill

| Use this skill when... | Use another approach when... |

|------------------------|------------------------------|

| Setting up integration testing infrastructure with Supertest, pytest, or Testcontainers | Writing individual integration test cases for specific endpoints (use api-plugin:api-testing) |

| Creating docker-compose.test.yml for local test service containers | Running existing integration tests (bun test, pytest -m integration) |

| Auditing integration test setup for completeness (fixtures, factories, CI) | Configuring unit test runners (/configure:tests instead) |

| Adding integration test jobs to GitHub Actions with service containers | Debugging a specific failing integration test |

| Separating integration tests from unit tests in project structure | Setting up API contract testing (/configure:api-tests instead) |

Context

Parameters

Parse from command arguments:

Integration Testing Stacks:

Key Difference from Unit Tests:

Execution

Execute this integration testing compliance check:

Step 1: Detect existing integration testing infrastructure

Check for these indicators:

| Indicator | Component | Status |

|-----------|-----------|--------|

| tests/integration/ directory | Integration tests | Present |

| testcontainers in dependencies | Container testing | Configured |

| supertest in package.json | HTTP testing | Configured |

| docker-compose.test.yml | Test services | Present |

| pytest.ini with integration marker | pytest integration | Configured |

Step 2: Analyze current state

Check for complete integration testing setup:

Test Organization:

JavaScript/TypeScript (Supertest):

Python (pytest + testcontainers):

Container Infrastructure:

Step 3: Generate compliance report

Print a formatted compliance report:

Integration Testing Compliance Report
======================================
Project: [name]
Language: [TypeScript | Python | Rust | Go]

Test Organization:
  Integration directory    tests/integration/         [EXISTS | MISSING]
  Separated from unit      not in src/                [CORRECT | MIXED]
  Test fixtures            tests/fixtures/            [EXISTS | MISSING]
  Database seeds           tests/seeds/               [EXISTS | N/A]

Framework Setup:
  HTTP testing             supertest/httpx            [INSTALLED | MISSING]
  Container testing        testcontainers             [INSTALLED | MISSING]
  Async support            pytest-asyncio             [INSTALLED | N/A]

Infrastructure:
  docker-compose.test.yml  test services              [EXISTS | MISSING]
  Test database            PostgreSQL/SQLite          [CONFIGURED | MISSING]
  Service isolation        network config             [CONFIGURED | MISSING]

CI/CD Integration:
  Integration test job     GitHub Actions             [CONFIGURED | MISSING]
  Service containers       workflow services          [CONFIGURED | MISSING]

Overall: [X issues found]

Recommendations:
  - Install testcontainers for database testing
  - Create docker-compose.test.yml for local testing
  - Add integration test job to CI workflow

If --check-only, stop here.

Step 4: Configure integration testing (if --fix or user confirms)

Apply configuration based on detected project type. Use templates from REFERENCE.md:

  1. Install dependencies (supertest, testcontainers, etc.)
  2. Create test directory (tests/integration/) with setup files
  3. Create sample tests for API endpoints and database operations
  4. Create Vitest integration config (JS/TS) or pytest markers (Python)
  5. Add scripts to package.json or create run commands

Step 5: Create container infrastructure

Create docker-compose.test.yml with:

Add corresponding npm/bun scripts for managing test containers. Use templates from REFERENCE.md.

Step 6: Configure CI/CD integration

Add integration test job to .github/workflows/test.yml with:

Use the CI workflow template from REFERENCE.md.

Step 7: Create test fixtures and factories

Create tests/fixtures/factories.ts (or Python equivalent) with:

Use factory templates from REFERENCE.md.

Step 8: Update standards tracking

Update .project-standards.yaml:

standards_version: "2025.1"
last_configured: "[timestamp]"
components:
  integration_tests: "2025.1"
  integration_tests_framework: "[supertest|pytest|testcontainers]"
  integration_tests_containers: true
  integration_tests_ci: true

Step 9: Print final report

Print a summary of changes applied, scripts added, and next steps for running integration tests.

For detailed templates and code examples, see REFERENCE.md.

Agentic Optimizations

| Context | Command |

|---------|---------|

| Quick compliance check | /configure:integration-tests --check-only |

| Auto-fix all issues | /configure:integration-tests --fix |

| Run integration tests (JS) | bun test tests/integration --dots --bail=1 |

| Run integration tests (Python) | pytest -m integration -x -q |

| Start test containers | docker compose -f docker-compose.test.yml up -d |

| Check container health | docker compose -f docker-compose.test.yml ps --format json | jq -c '.[] | {Name, State}' |

Flags

| Flag | Description |

|------|-------------|

| --check-only | Report status without offering fixes |

| --fix | Apply all fixes automatically without prompting |

| --framework <framework> | Override framework detection (supertest, pytest, testcontainers) |

Examples

# Check compliance and offer fixes
/configure:integration-tests

# Check only, no modifications
/configure:integration-tests --check-only

# Auto-fix all issues
/configure:integration-tests --fix

# Force specific framework
/configure:integration-tests --fix --framework pytest

Error Handling

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.