/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.
$ npx -y skills add proffesor-for-testing/agentic-qe --skill test-environment-management --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/test-environment-management
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
test-environment-management.SKILL.mdname: test-environment-management
description: "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."
category: specialized-testing
priority: medium
tokenEstimate: 900
agents: [qe-test-executor, qe-performance-tester, qe-chaos-engineer]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [environment, docker, kubernetes, infrastructure, parity, cost-optimization]
trust_tier: 1
validation:
schema_path: schemas/output.json
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
---
Docker for Test Environments
# 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:**
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
---
Service Virtualization
// 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
# 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):**
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
// 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
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
**With Agents:** Agents automatically provision test environments matching production, ensure parity, mock external services, and optimize costs with auto-scaling and auto-shutdown.
Read more
name: test-environment-management description: "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." category: specialized-testing priority: medium tokenEstimate: 900 agents: [qe-test-executor, qe-performance-tester, qe-chaos-engineer] implementation_status: optimized optimization_version: 1.0 last_optimized: 2025-12-02 dependencies: [] quick_reference_card: true tags: [environment, docker, kubernetes, infrastructure, parity, cost-optimization] trust_tier: 1 validation: schema_path: schemas/output.json
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
---
Docker for Test Environments
# 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:**
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
---
Service Virtualization
// 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
# 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):**
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
// 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
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
**With Agents:** Agents automatically provision test environments matching production, ensure parity, mock external services, and optimize costs with auto-scaling and auto-shutdown.
AI-powered quality engineering agents that generate tests, find coverage gaps, detect flaky tests, and learn your codebase patterns — across 11 coding agent platforms.
Repo: proffesor-for-testing/agentic-qe
Other skills on agentic-qe.
- /a11y-ally
Use when running comprehensive WCAG accessibility audits with axe-core + pa11y + Lighthouse, generating context-aware remediation, or testing video accessibility. Supports 3-tier browser cascade with graceful degradation.
Open skill - /accessibility-testing
WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.
Open skill - /agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Open skill - /agentdb-learning
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Open skill - /agentdb-memory-patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Open skill - /agentdb-optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
Open skill

