test-environment-management
Installation
SKILL.md
Test Environment Management
Unreliable environments cause more test failures than bad tests. Aim for hermetic, disposable, production-like, and self-service.
Environment strategy
| Type | Use | Lifecycle |
|---|---|---|
| Local (Compose/Testcontainers) | Dev + unit/integration | per run |
| Ephemeral preview | Per-PR full stack for E2E/UAT | created on PR, destroyed on merge (Vercel/Netlify previews, Argo CD ApplicationSet, namespace-per-PR, Okteto, Tilt) |
| Shared integration/staging | Cross-team integration, pre-prod | long-lived, reset nightly |
| Perf / prod-like | Load & soak, capacity | booked windows, scaled to ratio |
| Production (synthetic) | Shift-right | permanent (production-monitoring-synthetic-testing) |
Principles
- Infrastructure as code for envs (Terraform/Helm/Kustomize/Compose) — rebuild from scratch in minutes.
- Parity: same OS, versions, DB engine, config shape, flags, network topology; document deliberate diffs. Pin image digests.
- Isolation: per-run data namespace or DB/schema; no cross-test coupling; avoid global shared accounts.
- Determinism: fixed clock/seed, controlled 3rd-party responses.
- Observability: logs/traces/metrics available in test env; retain artifacts on failure.