npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin test-environment-managerThis skill is limited to using the following tools:
Provision, configure, and manage isolated test environments for reliable test execution. Supports Docker Compose environments, Testcontainers, local service stacks, and ephemeral CI environments.
Sets up integration tests across databases, APIs, and message queues using Testcontainers, with DB seeding, cleanup strategies, and Docker dependencies.
Checks and configures integration testing infrastructure for services, databases, and external dependencies using Supertest, pytest, or Testcontainers in JS/TS, Python, Rust, Go projects.
Executes integration tests for APIs, databases, services, queues, and files using real dependencies and Docker infra. Validates component interactions without mocks.
Share bugs, ideas, or general feedback.
Provision, configure, and manage isolated test environments for reliable test execution. Supports Docker Compose environments, Testcontainers, local service stacks, and ephemeral CI environments.
.env files or secrets managerdocker-compose.yml, .env.test, jest.config.*, pytest.ini) to understand current environment setup.docker-compose.test.yml defining isolated service containers:
.env.test) with connection strings, API keys, and feature flags appropriate for testing.docker-compose.test.yml with all required service definitions.env.test with test-specific configuration valuesseeds/test-data.sql or equivalent)scripts/test-env.sh)| Error | Cause | Solution |
|---|---|---|
| Port already in use | Another process or dev environment occupies the port | Use dynamic port allocation or specify alternate ports in docker-compose.test.yml |
| Container health check timeout | Service takes too long to initialize | Increase health check interval and retries; ensure sufficient memory allocation |
| Database seed failure | Migration conflicts or missing schema | Run migrations before seeds; verify migration order; check for schema drift |
| Environment variable not found | .env.test not loaded or variable misspelled | Verify dotenv loading order; use env-cmd or dotenv-cli to inject variables |
| Stale Docker volumes | Previous test data persists across runs | Add --volumes flag to docker-compose down in teardown; use tmpfs mounts |
Docker Compose test environment with PostgreSQL and Redis:
# docker-compose.test.yml
services:
postgres-test:
image: postgres:16-alpine
environment:
POSTGRES_DB: testdb
POSTGRES_PASSWORD: testpass
ports: ["5433:5432"] # 5432: 5433: PostgreSQL port
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
retries: 10
redis-test:
image: redis:7-alpine
ports: ["6380:6379"] # 6379: 6380: Redis TLS port
healthcheck:
test: ["CMD", "redis-cli", "ping"]
Testcontainers setup in Jest:
import { PostgreSqlContainer } from '@testcontainers/postgresql';
let container;
beforeAll(async () => {
container = await new PostgreSqlContainer().start();
process.env.DATABASE_URL = container.getConnectionUri();
}, 30000); # 30000: 30 seconds in ms
afterAll(async () => { await container.stop(); });