Test provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".
npx claudepluginhub flight505/skill-forge --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.
Applies Acme Corporation brand guidelines including colors, fonts, layouts, and messaging to generated PowerPoint, Excel, and PDF documents.
Enforces four-phase systematic debugging: root cause investigation via error reading, reproduction, change checks, and multi-component logging before any fixes for bugs, tests, or issues.
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(); });