qe-test-environment-management
Test environment provisioning, infrastructure as code for testing, Docker/Kubernetes for test environments, service virtualization, and cost optimization. Use when managing test infrastructure, ensuring environment parity, or optimizing testing costs.
Best use case
qe-test-environment-management is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Test environment provisioning, infrastructure as code for testing, Docker/Kubernetes for test environments, service virtualization, and cost optimization. Use when managing test infrastructure, ensuring environment parity, or optimizing testing costs.
Teams using qe-test-environment-management should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/qe-test-environment-management/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How qe-test-environment-management Compares
| Feature / Agent | qe-test-environment-management | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Test environment provisioning, infrastructure as code for testing, Docker/Kubernetes for test environments, service virtualization, and cost optimization. Use when managing test infrastructure, ensuring environment parity, or optimizing testing costs.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Test Environment Management
<default_to_action>
When managing test environments:
1. DEFINE environment types (local, CI, staging, prod)
2. CONTAINERIZE with Docker for consistency
3. ENSURE parity with production (same versions, configs)
4. MOCK external services (service virtualization)
5. OPTIMIZE costs (auto-shutdown, spot instances)
**Quick Environment Checklist:**
- Same OS/versions as production
- Same database type and version
- Same configuration structure
- Containers for reproducibility
- Auto-shutdown after hours
**Critical Success Factors:**
- "Works on my machine" = environment inconsistency
- Infrastructure as Code = repeatable environments
- Service virtualization = test without external dependencies
</default_to_action>
## Quick Reference Card
### When to Use
- Setting up test infrastructure
- Debugging environment-specific failures
- Reducing test infrastructure costs
- Ensuring dev/prod parity
### Environment Types
| Type | Purpose | Lifetime |
|------|---------|----------|
| **Local** | Fast feedback | Developer session |
| **CI** | Automated tests | Per build (ephemeral) |
| **Staging** | Pre-prod validation | Persistent |
| **Production** | Canary/synthetic | Continuous |
### Dev/Prod Parity Checklist
| Item | Must Match |
|------|------------|
| OS | Same version |
| Database | Same type + version |
| Dependencies | Same versions |
| Config | Same structure |
| Env vars | Same names |
---
## Docker for Test Environments
```yaml
# docker-compose.test.yml
version: '3.8'
services:
app:
build: .
ports:
- "3000:3000"
environment:
NODE_ENV: test
DATABASE_URL: postgres://postgres:password@db:5432/test
depends_on:
- db
- redis
db:
image: postgres:15
environment:
POSTGRES_DB: test
POSTGRES_PASSWORD: password
redis:
image: redis:7
```
**Run tests in container:**
```bash
docker-compose -f docker-compose.test.yml up -d
docker-compose -f docker-compose.test.yml exec app npm test
docker-compose -f docker-compose.test.yml down
```
---
## Infrastructure as Code
```hcl
# test-environment.tf
resource "aws_instance" "test_server" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t3.medium"
tags = {
Name = "test-environment"
Environment = "test"
AutoShutdown = "20:00" # Cost optimization
}
}
resource "aws_rds_instance" "test_db" {
engine = "postgres"
engine_version = "15"
instance_class = "db.t3.micro"
backup_retention_period = 0 # No backups needed for test
skip_final_snapshot = true
}
```
---
## Service Virtualization
```javascript
// Mock external services with WireMock
import { WireMock } from 'wiremock-captain';
const wiremock = new WireMock('http://localhost:8080');
// Mock payment gateway
await wiremock.register({
request: {
method: 'POST',
url: '/charge'
},
response: {
status: 200,
jsonBody: { transactionId: '12345', status: 'approved' }
}
});
// Tests use mock instead of real gateway
```
---
## Cost Optimization
```bash
# Auto-shutdown test environments after hours
0 20 * * * aws ec2 stop-instances --instance-ids $(aws ec2 describe-instances \
--filters "Name=tag:Environment,Values=test" \
--query "Reservations[].Instances[].InstanceId" --output text)
# Start before work hours
0 7 * * 1-5 aws ec2 start-instances --instance-ids $(aws ec2 describe-instances \
--filters "Name=tag:Environment,Values=test" \
--query "Reservations[].Instances[].InstanceId" --output text)
```
**Use spot instances (70% savings):**
```hcl
resource "aws_instance" "test_runner" {
instance_type = "c5.2xlarge"
instance_market_options {
market_type = "spot"
spot_options {
max_price = "0.10"
}
}
}
```
---
## Agent-Driven Environment Management
```typescript
// Provision test environment
await Task("Environment Provisioning", {
type: 'integration-testing',
services: ['app', 'db', 'redis', 'mocks'],
parity: 'production',
lifetime: '2h'
}, "qe-test-executor");
// Chaos testing in isolated environment
await Task("Chaos Test Environment", {
baseline: 'staging',
isolate: true,
injectFaults: ['network-delay', 'pod-failure']
}, "qe-chaos-engineer");
```
---
## Agent Coordination Hints
### Memory Namespace
```
aqe/environment-management/
├── configs/* - Environment configurations
├── parity-checks/* - Dev/prod parity results
├── cost-reports/* - Infrastructure costs
└── service-mocks/* - Service virtualization configs
```
### Fleet Coordination
```typescript
const envFleet = await FleetManager.coordinate({
strategy: 'environment-management',
agents: [
'qe-test-executor', // Provision environments
'qe-performance-tester', // Environment performance
'qe-chaos-engineer' // Resilience testing
],
topology: 'sequential'
});
```
---
## Related Skills
- [test-data-management](../test-data-management/) - Data for environments
- [continuous-testing-shift-left](../continuous-testing-shift-left/) - CI/CD environments
- [chaos-engineering-resilience](../chaos-engineering-resilience/) - Environment resilience
---
## Remember
**Environment inconsistency = flaky tests.** "Works on my machine" problems come from: different OS/versions, missing dependencies, configuration differences, data differences.
**Infrastructure as Code ensures repeatability.** Version control your environment configurations. Spin up identical environments on demand.
**With Agents:** Agents automatically provision test environments matching production, ensure parity, mock external services, and optimize costs with auto-scaling and auto-shutdown.Related Skills
qe-visual-testing-advanced
Advanced visual regression testing with pixel-perfect comparison, AI-powered diff analysis, responsive design validation, and cross-browser visual consistency. Use when detecting UI regressions, validating designs, or ensuring visual consistency.
qe-testability-scoring
AI-powered testability assessment using 10 principles of intrinsic testability with Playwright and optional Vibium integration. Evaluates web applications against Observability, Controllability, Algorithmic Simplicity, Transparency, Stability, Explainability, Unbugginess, Smallness, Decomposability, and Similarity. Use when assessing software testability, evaluating test readiness, identifying testability improvements, or generating testability reports.
qe-test-reporting-analytics
Advanced test reporting, quality dashboards, predictive analytics, trend analysis, and executive reporting for QE metrics. Use when communicating quality status, tracking trends, or making data-driven decisions.
qe-test-idea-rewriting
Transform passive 'Verify X' test descriptions into active, observable test actions. Use when test ideas lack specificity, use vague language, or fail quality validation. Converts to action-verb format for clearer, more testable descriptions.
qe-test-design-techniques
Systematic test design with boundary value analysis, equivalence partitioning, decision tables, state transition testing, and combinatorial testing. Use when designing comprehensive test cases, reducing redundant tests, or ensuring systematic coverage.
qe-test-data-management
Strategic test data generation, management, and privacy compliance. Use when creating test data, handling PII, ensuring GDPR/CCPA compliance, or scaling data generation for realistic testing scenarios.
qe-test-automation-strategy
Design and implement effective test automation with proper pyramid, patterns, and CI/CD integration. Use when building automation frameworks or improving test efficiency.
qe-shift-right-testing
Testing in production with feature flags, canary deployments, synthetic monitoring, and chaos engineering. Use when implementing production observability or progressive delivery.
qe-shift-left-testing
Move testing activities earlier in the development lifecycle to catch defects when they're cheapest to fix. Use when implementing TDD, CI/CD, or early quality practices.
qe-security-visual-testing
Security-first visual testing combining URL validation, PII detection, and visual regression with parallel viewport support. Use when testing web applications that handle sensitive data, need visual regression coverage, or require WCAG accessibility compliance.
qe-security-testing
Test for security vulnerabilities using OWASP principles. Use when conducting security audits, testing auth, or implementing security practices.
qe-risk-based-testing
Focus testing effort on highest-risk areas using risk assessment and prioritization. Use when planning test strategy, allocating testing resources, or making coverage decisions.