agentic-qe 1.9.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +95 -1336
  2. package/.claude/agents/qe-chaos-engineer.md +152 -1211
  3. package/.claude/agents/qe-code-complexity.md +144 -707
  4. package/.claude/agents/qe-coverage-analyzer.md +147 -743
  5. package/.claude/agents/qe-deployment-readiness.md +143 -1496
  6. package/.claude/agents/qe-flaky-test-hunter.md +132 -1529
  7. package/.claude/agents/qe-fleet-commander.md +12 -12
  8. package/.claude/agents/qe-performance-tester.md +150 -886
  9. package/.claude/agents/qe-production-intelligence.md +155 -1396
  10. package/.claude/agents/qe-quality-analyzer.md +6 -6
  11. package/.claude/agents/qe-quality-gate.md +151 -648
  12. package/.claude/agents/qe-regression-risk-analyzer.md +132 -1150
  13. package/.claude/agents/qe-requirements-validator.md +149 -932
  14. package/.claude/agents/qe-security-scanner.md +157 -797
  15. package/.claude/agents/qe-test-data-architect.md +96 -1365
  16. package/.claude/agents/qe-test-executor.md +8 -8
  17. package/.claude/agents/qe-test-generator.md +145 -1540
  18. package/.claude/agents/qe-visual-tester.md +153 -1257
  19. package/.claude/agents/qx-partner.md +248 -0
  20. package/.claude/agents/subagents/qe-code-reviewer.md +40 -136
  21. package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +40 -480
  22. package/.claude/agents/subagents/qe-data-generator.md +41 -125
  23. package/.claude/agents/subagents/qe-flaky-investigator.md +55 -411
  24. package/.claude/agents/subagents/qe-integration-tester.md +53 -141
  25. package/.claude/agents/subagents/qe-performance-validator.md +54 -130
  26. package/.claude/agents/subagents/qe-security-auditor.md +56 -114
  27. package/.claude/agents/subagents/qe-test-data-architect-sub.md +57 -548
  28. package/.claude/agents/subagents/qe-test-implementer.md +58 -551
  29. package/.claude/agents/subagents/qe-test-refactorer.md +65 -722
  30. package/.claude/agents/subagents/qe-test-writer.md +63 -726
  31. package/.claude/skills/accessibility-testing/SKILL.md +144 -692
  32. package/.claude/skills/agentic-quality-engineering/SKILL.md +176 -529
  33. package/.claude/skills/api-testing-patterns/SKILL.md +180 -560
  34. package/.claude/skills/brutal-honesty-review/SKILL.md +113 -603
  35. package/.claude/skills/bug-reporting-excellence/SKILL.md +116 -517
  36. package/.claude/skills/chaos-engineering-resilience/SKILL.md +127 -72
  37. package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +209 -404
  38. package/.claude/skills/code-review-quality/SKILL.md +158 -608
  39. package/.claude/skills/compatibility-testing/SKILL.md +148 -38
  40. package/.claude/skills/compliance-testing/SKILL.md +132 -63
  41. package/.claude/skills/consultancy-practices/SKILL.md +114 -446
  42. package/.claude/skills/context-driven-testing/SKILL.md +117 -381
  43. package/.claude/skills/contract-testing/SKILL.md +176 -141
  44. package/.claude/skills/database-testing/SKILL.md +137 -130
  45. package/.claude/skills/exploratory-testing-advanced/SKILL.md +160 -629
  46. package/.claude/skills/holistic-testing-pact/SKILL.md +140 -188
  47. package/.claude/skills/localization-testing/SKILL.md +145 -33
  48. package/.claude/skills/mobile-testing/SKILL.md +132 -448
  49. package/.claude/skills/mutation-testing/SKILL.md +147 -41
  50. package/.claude/skills/performance-testing/SKILL.md +200 -546
  51. package/.claude/skills/quality-metrics/SKILL.md +164 -519
  52. package/.claude/skills/refactoring-patterns/SKILL.md +132 -699
  53. package/.claude/skills/regression-testing/SKILL.md +120 -926
  54. package/.claude/skills/risk-based-testing/SKILL.md +157 -660
  55. package/.claude/skills/security-testing/SKILL.md +199 -538
  56. package/.claude/skills/sherlock-review/SKILL.md +163 -699
  57. package/.claude/skills/shift-left-testing/SKILL.md +161 -465
  58. package/.claude/skills/shift-right-testing/SKILL.md +161 -519
  59. package/.claude/skills/six-thinking-hats/SKILL.md +175 -1110
  60. package/.claude/skills/skills-manifest.json +683 -0
  61. package/.claude/skills/tdd-london-chicago/SKILL.md +131 -448
  62. package/.claude/skills/technical-writing/SKILL.md +103 -154
  63. package/.claude/skills/test-automation-strategy/SKILL.md +166 -772
  64. package/.claude/skills/test-data-management/SKILL.md +126 -910
  65. package/.claude/skills/test-design-techniques/SKILL.md +179 -89
  66. package/.claude/skills/test-environment-management/SKILL.md +136 -91
  67. package/.claude/skills/test-reporting-analytics/SKILL.md +169 -92
  68. package/.claude/skills/testability-scoring/README.md +71 -0
  69. package/.claude/skills/testability-scoring/SKILL.md +245 -0
  70. package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -0
  71. package/.claude/skills/testability-scoring/resources/templates/testability-scoring.spec.template.js +532 -0
  72. package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -0
  73. package/.claude/skills/testability-scoring/scripts/run-assessment.sh +70 -0
  74. package/.claude/skills/visual-testing-advanced/SKILL.md +155 -78
  75. package/.claude/skills/xp-practices/SKILL.md +151 -587
  76. package/CHANGELOG.md +110 -0
  77. package/README.md +55 -21
  78. package/dist/agents/QXPartnerAgent.d.ts +146 -0
  79. package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
  80. package/dist/agents/QXPartnerAgent.js +1831 -0
  81. package/dist/agents/QXPartnerAgent.js.map +1 -0
  82. package/dist/agents/index.d.ts +1 -0
  83. package/dist/agents/index.d.ts.map +1 -1
  84. package/dist/agents/index.js +82 -2
  85. package/dist/agents/index.js.map +1 -1
  86. package/dist/agents/lifecycle/AgentLifecycleManager.d.ts.map +1 -1
  87. package/dist/agents/lifecycle/AgentLifecycleManager.js +34 -31
  88. package/dist/agents/lifecycle/AgentLifecycleManager.js.map +1 -1
  89. package/dist/cli/commands/debug/agent.d.ts.map +1 -1
  90. package/dist/cli/commands/debug/agent.js +19 -6
  91. package/dist/cli/commands/debug/agent.js.map +1 -1
  92. package/dist/cli/commands/debug/health-check.js +20 -7
  93. package/dist/cli/commands/debug/health-check.js.map +1 -1
  94. package/dist/cli/commands/init-claude-md-template.d.ts +1 -0
  95. package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
  96. package/dist/cli/commands/init-claude-md-template.js +18 -3
  97. package/dist/cli/commands/init-claude-md-template.js.map +1 -1
  98. package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
  99. package/dist/cli/commands/workflow/cancel.js +4 -3
  100. package/dist/cli/commands/workflow/cancel.js.map +1 -1
  101. package/dist/cli/commands/workflow/list.d.ts.map +1 -1
  102. package/dist/cli/commands/workflow/list.js +4 -3
  103. package/dist/cli/commands/workflow/list.js.map +1 -1
  104. package/dist/cli/commands/workflow/pause.d.ts.map +1 -1
  105. package/dist/cli/commands/workflow/pause.js +4 -3
  106. package/dist/cli/commands/workflow/pause.js.map +1 -1
  107. package/dist/cli/init/claude-config.d.ts.map +1 -1
  108. package/dist/cli/init/claude-config.js +3 -8
  109. package/dist/cli/init/claude-config.js.map +1 -1
  110. package/dist/cli/init/claude-md.d.ts.map +1 -1
  111. package/dist/cli/init/claude-md.js +44 -2
  112. package/dist/cli/init/claude-md.js.map +1 -1
  113. package/dist/cli/init/database-init.js +1 -1
  114. package/dist/cli/init/index.d.ts.map +1 -1
  115. package/dist/cli/init/index.js +13 -6
  116. package/dist/cli/init/index.js.map +1 -1
  117. package/dist/cli/init/skills.d.ts.map +1 -1
  118. package/dist/cli/init/skills.js +2 -1
  119. package/dist/cli/init/skills.js.map +1 -1
  120. package/dist/core/SwarmCoordinator.d.ts +180 -0
  121. package/dist/core/SwarmCoordinator.d.ts.map +1 -0
  122. package/dist/core/SwarmCoordinator.js +473 -0
  123. package/dist/core/SwarmCoordinator.js.map +1 -0
  124. package/dist/core/memory/AgentDBIntegration.d.ts +24 -6
  125. package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -1
  126. package/dist/core/memory/AgentDBIntegration.js +66 -10
  127. package/dist/core/memory/AgentDBIntegration.js.map +1 -1
  128. package/dist/core/memory/UnifiedMemoryCoordinator.d.ts +341 -0
  129. package/dist/core/memory/UnifiedMemoryCoordinator.d.ts.map +1 -0
  130. package/dist/core/memory/UnifiedMemoryCoordinator.js +986 -0
  131. package/dist/core/memory/UnifiedMemoryCoordinator.js.map +1 -0
  132. package/dist/core/memory/index.d.ts +5 -0
  133. package/dist/core/memory/index.d.ts.map +1 -1
  134. package/dist/core/memory/index.js +23 -1
  135. package/dist/core/memory/index.js.map +1 -1
  136. package/dist/core/metrics/MetricsAggregator.d.ts +228 -0
  137. package/dist/core/metrics/MetricsAggregator.d.ts.map +1 -0
  138. package/dist/core/metrics/MetricsAggregator.js +482 -0
  139. package/dist/core/metrics/MetricsAggregator.js.map +1 -0
  140. package/dist/core/metrics/index.d.ts +5 -0
  141. package/dist/core/metrics/index.d.ts.map +1 -0
  142. package/dist/core/metrics/index.js +11 -0
  143. package/dist/core/metrics/index.js.map +1 -0
  144. package/dist/core/optimization/SwarmOptimizer.d.ts +190 -0
  145. package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
  146. package/dist/core/optimization/SwarmOptimizer.js +648 -0
  147. package/dist/core/optimization/SwarmOptimizer.js.map +1 -0
  148. package/dist/core/optimization/index.d.ts +9 -0
  149. package/dist/core/optimization/index.d.ts.map +1 -0
  150. package/dist/core/optimization/index.js +25 -0
  151. package/dist/core/optimization/index.js.map +1 -0
  152. package/dist/core/optimization/types.d.ts +53 -0
  153. package/dist/core/optimization/types.d.ts.map +1 -0
  154. package/dist/core/optimization/types.js +6 -0
  155. package/dist/core/optimization/types.js.map +1 -0
  156. package/dist/core/orchestration/AdaptiveScheduler.d.ts +190 -0
  157. package/dist/core/orchestration/AdaptiveScheduler.d.ts.map +1 -0
  158. package/dist/core/orchestration/AdaptiveScheduler.js +460 -0
  159. package/dist/core/orchestration/AdaptiveScheduler.js.map +1 -0
  160. package/dist/core/orchestration/PriorityQueue.d.ts +54 -0
  161. package/dist/core/orchestration/PriorityQueue.d.ts.map +1 -0
  162. package/dist/core/orchestration/PriorityQueue.js +122 -0
  163. package/dist/core/orchestration/PriorityQueue.js.map +1 -0
  164. package/dist/core/orchestration/WorkflowOrchestrator.d.ts +189 -0
  165. package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
  166. package/dist/core/orchestration/WorkflowOrchestrator.js +845 -0
  167. package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -0
  168. package/dist/core/orchestration/index.d.ts +7 -0
  169. package/dist/core/orchestration/index.d.ts.map +1 -0
  170. package/dist/core/orchestration/index.js +11 -0
  171. package/dist/core/orchestration/index.js.map +1 -0
  172. package/dist/core/orchestration/types.d.ts +96 -0
  173. package/dist/core/orchestration/types.d.ts.map +1 -0
  174. package/dist/core/orchestration/types.js +6 -0
  175. package/dist/core/orchestration/types.js.map +1 -0
  176. package/dist/core/recovery/CircuitBreaker.d.ts +176 -0
  177. package/dist/core/recovery/CircuitBreaker.d.ts.map +1 -0
  178. package/dist/core/recovery/CircuitBreaker.js +382 -0
  179. package/dist/core/recovery/CircuitBreaker.js.map +1 -0
  180. package/dist/core/recovery/RecoveryOrchestrator.d.ts +186 -0
  181. package/dist/core/recovery/RecoveryOrchestrator.d.ts.map +1 -0
  182. package/dist/core/recovery/RecoveryOrchestrator.js +476 -0
  183. package/dist/core/recovery/RecoveryOrchestrator.js.map +1 -0
  184. package/dist/core/recovery/RetryStrategy.d.ts +127 -0
  185. package/dist/core/recovery/RetryStrategy.d.ts.map +1 -0
  186. package/dist/core/recovery/RetryStrategy.js +314 -0
  187. package/dist/core/recovery/RetryStrategy.js.map +1 -0
  188. package/dist/core/recovery/index.d.ts +8 -0
  189. package/dist/core/recovery/index.d.ts.map +1 -0
  190. package/dist/core/recovery/index.js +27 -0
  191. package/dist/core/recovery/index.js.map +1 -0
  192. package/dist/core/skills/DependencyResolver.d.ts +99 -0
  193. package/dist/core/skills/DependencyResolver.d.ts.map +1 -0
  194. package/dist/core/skills/DependencyResolver.js +260 -0
  195. package/dist/core/skills/DependencyResolver.js.map +1 -0
  196. package/dist/core/skills/DynamicSkillLoader.d.ts +96 -0
  197. package/dist/core/skills/DynamicSkillLoader.d.ts.map +1 -0
  198. package/dist/core/skills/DynamicSkillLoader.js +353 -0
  199. package/dist/core/skills/DynamicSkillLoader.js.map +1 -0
  200. package/dist/core/skills/ManifestGenerator.d.ts +114 -0
  201. package/dist/core/skills/ManifestGenerator.d.ts.map +1 -0
  202. package/dist/core/skills/ManifestGenerator.js +449 -0
  203. package/dist/core/skills/ManifestGenerator.js.map +1 -0
  204. package/dist/core/skills/index.d.ts +9 -0
  205. package/dist/core/skills/index.d.ts.map +1 -0
  206. package/dist/core/skills/index.js +24 -0
  207. package/dist/core/skills/index.js.map +1 -0
  208. package/dist/core/skills/types.d.ts +118 -0
  209. package/dist/core/skills/types.d.ts.map +1 -0
  210. package/dist/core/skills/types.js +7 -0
  211. package/dist/core/skills/types.js.map +1 -0
  212. package/dist/core/transport/QUICTransport.d.ts +320 -0
  213. package/dist/core/transport/QUICTransport.d.ts.map +1 -0
  214. package/dist/core/transport/QUICTransport.js +711 -0
  215. package/dist/core/transport/QUICTransport.js.map +1 -0
  216. package/dist/core/transport/index.d.ts +40 -0
  217. package/dist/core/transport/index.d.ts.map +1 -0
  218. package/dist/core/transport/index.js +46 -0
  219. package/dist/core/transport/index.js.map +1 -0
  220. package/dist/core/transport/quic-loader.d.ts +123 -0
  221. package/dist/core/transport/quic-loader.d.ts.map +1 -0
  222. package/dist/core/transport/quic-loader.js +293 -0
  223. package/dist/core/transport/quic-loader.js.map +1 -0
  224. package/dist/core/transport/quic.d.ts +154 -0
  225. package/dist/core/transport/quic.d.ts.map +1 -0
  226. package/dist/core/transport/quic.js +214 -0
  227. package/dist/core/transport/quic.js.map +1 -0
  228. package/dist/mcp/server.d.ts +9 -9
  229. package/dist/mcp/server.d.ts.map +1 -1
  230. package/dist/mcp/server.js +1 -2
  231. package/dist/mcp/server.js.map +1 -1
  232. package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
  233. package/dist/mcp/services/AgentRegistry.js +4 -1
  234. package/dist/mcp/services/AgentRegistry.js.map +1 -1
  235. package/dist/types/index.d.ts +2 -1
  236. package/dist/types/index.d.ts.map +1 -1
  237. package/dist/types/index.js +2 -0
  238. package/dist/types/index.js.map +1 -1
  239. package/dist/types/qx.d.ts +429 -0
  240. package/dist/types/qx.d.ts.map +1 -0
  241. package/dist/types/qx.js +71 -0
  242. package/dist/types/qx.js.map +1 -0
  243. package/dist/visualization/api/RestEndpoints.js +2 -2
  244. package/dist/visualization/api/RestEndpoints.js.map +1 -1
  245. package/dist/visualization/api/WebSocketServer.d.ts +44 -0
  246. package/dist/visualization/api/WebSocketServer.d.ts.map +1 -1
  247. package/dist/visualization/api/WebSocketServer.js +144 -23
  248. package/dist/visualization/api/WebSocketServer.js.map +1 -1
  249. package/dist/visualization/core/DataTransformer.d.ts +10 -0
  250. package/dist/visualization/core/DataTransformer.d.ts.map +1 -1
  251. package/dist/visualization/core/DataTransformer.js +60 -5
  252. package/dist/visualization/core/DataTransformer.js.map +1 -1
  253. package/dist/visualization/emit-event.d.ts +75 -0
  254. package/dist/visualization/emit-event.d.ts.map +1 -0
  255. package/dist/visualization/emit-event.js +213 -0
  256. package/dist/visualization/emit-event.js.map +1 -0
  257. package/dist/visualization/index.d.ts +1 -0
  258. package/dist/visualization/index.d.ts.map +1 -1
  259. package/dist/visualization/index.js +7 -1
  260. package/dist/visualization/index.js.map +1 -1
  261. package/docs/reference/skills.md +63 -1
  262. package/package.json +16 -58
@@ -1,154 +1,244 @@
1
1
  ---
2
2
  name: test-design-techniques
3
- description: 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.
3
+ description: "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."
4
+ category: specialized-testing
5
+ priority: high
6
+ tokenEstimate: 900
7
+ agents: [qe-test-generator, qe-coverage-analyzer, qe-quality-analyzer]
8
+ implementation_status: optimized
9
+ optimization_version: 1.0
10
+ last_optimized: 2025-12-02
11
+ dependencies: []
12
+ quick_reference_card: true
13
+ tags: [test-design, bva, equivalence-partitioning, decision-tables, pairwise, state-transition]
4
14
  ---
5
15
 
6
16
  # Test Design Techniques
7
17
 
8
- ## Core Principle
18
+ <default_to_action>
19
+ When designing test cases systematically:
20
+ 1. APPLY Boundary Value Analysis (test at min, max, edges)
21
+ 2. USE Equivalence Partitioning (one test per partition)
22
+ 3. CREATE Decision Tables (for complex business rules)
23
+ 4. MODEL State Transitions (for stateful behavior)
24
+ 5. REDUCE with Pairwise Testing (for combinations)
25
+
26
+ **Quick Design Selection:**
27
+ - Numeric ranges → BVA + EP
28
+ - Multiple conditions → Decision Tables
29
+ - Workflows → State Transition
30
+ - Many parameters → Pairwise Testing
31
+
32
+ **Critical Success Factors:**
33
+ - Systematic design finds more bugs with fewer tests
34
+ - Random testing is inefficient
35
+ - 40+ years of research backs these techniques
36
+ </default_to_action>
37
+
38
+ ## Quick Reference Card
39
+
40
+ ### When to Use
41
+ - Designing new test suites
42
+ - Optimizing existing tests
43
+ - Complex business rules
44
+ - Reducing test redundancy
45
+
46
+ ### Technique Selection Guide
47
+ | Scenario | Technique |
48
+ |----------|-----------|
49
+ | **Numeric input ranges** | BVA + EP |
50
+ | **Multiple conditions** | Decision Tables |
51
+ | **Stateful workflows** | State Transition |
52
+ | **Many parameter combinations** | Pairwise |
53
+ | **All combinations critical** | Full Factorial |
9
54
 
10
- **Systematic test design finds more bugs with fewer tests.**
11
-
12
- Random testing is inefficient. Proven test design techniques (40+ years of research) systematically identify high-value test cases, reduce redundancy, and maximize bug detection.
55
+ ---
13
56
 
14
57
  ## Boundary Value Analysis (BVA)
15
58
 
16
- **Principle:** Bugs cluster at boundaries of valid input ranges.
59
+ **Principle:** Bugs cluster at boundaries.
17
60
 
18
- **Test at:**
61
+ **Test at boundaries:**
19
62
  - Minimum valid value
20
63
  - Just below minimum (invalid)
21
64
  - Just above minimum (valid)
22
65
  - Maximum valid value
23
66
  - Just above maximum (invalid)
24
- - Just below maximum (valid)
25
67
 
26
- **Example: Age field (18-120)**
27
- ```
28
- Test Cases:
29
- ✓ 17 - Just below min (invalid, reject)
30
- 18 - Minimum valid (accept)
31
- 19 - Just above min (accept)
32
- 119 - Just below max (accept)
33
- 120 - Maximum valid (accept)
34
- 121 - Just above max (invalid, reject)
68
+ ```javascript
69
+ // Age field: 18-120 valid
70
+ const boundaryTests = [
71
+ { input: 17, expected: 'invalid' }, // Below min
72
+ { input: 18, expected: 'valid' }, // Min boundary
73
+ { input: 19, expected: 'valid' }, // Above min
74
+ { input: 119, expected: 'valid' }, // Below max
75
+ { input: 120, expected: 'valid' }, // Max boundary
76
+ { input: 121, expected: 'invalid' } // Above max
77
+ ];
35
78
  ```
36
79
 
37
- **With Agents:**
38
- ```typescript
39
- // qe-test-generator automatically identifies boundaries
40
- const tests = await agent.generateBVATests({
41
- field: 'age',
42
- dataType: 'integer',
43
- constraints: { min: 18, max: 120 }
44
- });
45
- // Returns: 6 boundary test cases
46
- ```
80
+ ---
47
81
 
48
82
  ## Equivalence Partitioning (EP)
49
83
 
50
- **Principle:** Divide input into partitions where all values behave the same.
84
+ **Principle:** One test per equivalent class.
51
85
 
52
- **Example: Discount based on quantity**
53
- ```
54
- Quantity Rules:
55
- 1-10: No discount
56
- 11-100: 10% discount
57
- 101+: 20% discount
58
-
59
- Partitions:
60
- 1. Invalid: quantity 0
61
- 2. Valid, no discount: 1-10
62
- 3. Valid, 10% discount: 11-100
63
- 4. Valid, 20% discount: 101+
64
-
65
- Test Cases (1 per partition):
66
- ✓ -1 → Reject
67
- ✓ 5 → 0% discount
68
- ✓ 50 → 10% discount
69
- ✓ 200 → 20% discount
86
+ ```javascript
87
+ // Discount rules:
88
+ // 1-10: No discount
89
+ // 11-100: 10% discount
90
+ // 101+: 20% discount
91
+
92
+ const partitionTests = [
93
+ { quantity: -1, expected: 'invalid' }, // Invalid partition
94
+ { quantity: 5, expected: 0 }, // Partition 1: 1-10
95
+ { quantity: 50, expected: 0.10 }, // Partition 2: 11-100
96
+ { quantity: 200, expected: 0.20 } // Partition 3: 101+
97
+ ];
98
+
99
+ // 4 tests cover all behavior (vs 200+ if testing every value)
70
100
  ```
71
101
 
102
+ ---
103
+
72
104
  ## Decision Tables
73
105
 
74
106
  **Use for:** Complex business rules with multiple conditions.
75
107
 
76
- **Example: Loan Approval**
77
108
  ```
78
- Conditions:
79
- - Age ≥ 18
80
- - Credit Score 700
81
- - Income ≥ $50k
82
-
83
- Rule 1 | Rule 2 | Rule 3 | Rule 4 | Rule 5
84
- -------|--------|--------|--------|-------
85
- Yes | Yes | Yes | No | Yes
86
- Yes | Yes | No | Yes | No
87
- Yes | No | Yes | Yes | Yes
88
- -------+--------+--------+--------+-------
89
- Approve| Approve| Reject | Reject | Reject
109
+ Loan Approval Rules:
110
+ ┌──────────────┬───────┬───────┬───────┬───────┬───────┐
111
+ Conditions │ R1 │ R2 │ R3 │ R4 │ R5 │
112
+ ├──────────────┼───────┼───────┼───────┼───────┼───────┤
113
+ │ Age ≥ 18 │ Yes │ Yes │ Yes │ No │ Yes │
114
+ Credit 700 Yes │ Yes │ No │ Yes │ No │
115
+ │ Income ≥ 50k │ Yes │ No │ Yes │ Yes │ Yes │
116
+ ├──────────────┼───────┼───────┼───────┼───────┼───────┤
117
+ Result │Approve│Approve│Reject │Reject │Reject
118
+ └──────────────┴───────┴───────┴───────┴───────┴───────┘
119
+
120
+ // 5 tests cover all decision combinations
90
121
  ```
91
122
 
92
- **Test Cases:** 5 tests cover all decision combinations.
123
+ ---
93
124
 
94
125
  ## State Transition Testing
95
126
 
96
127
  **Model state changes:**
128
+
97
129
  ```
98
130
  States: Logged Out → Logged In → Premium → Suspended
99
131
 
100
- Transitions:
101
- Login: Logged Out → Logged In
102
- Upgrade: Logged In → Premium
103
- Payment Fail: Premium → Suspended
104
- Logout: Any → Logged Out
132
+ Valid Transitions:
133
+ - Login: Logged Out → Logged In
134
+ - Upgrade: Logged In → Premium
135
+ - Payment Fail: Premium → Suspended
136
+ - Logout: Any → Logged Out
105
137
 
106
138
  Invalid Transitions to Test:
107
- Logged Out → Premium (should reject)
108
- Suspended → Premium (should reject)
139
+ - Logged Out → Premium (should reject)
140
+ - Suspended → Premium (should reject)
109
141
  ```
110
142
 
111
- ## Pairwise (Combinatorial) Testing
143
+ ```javascript
144
+ test('cannot upgrade without login', async () => {
145
+ const result = await user.upgrade(); // While logged out
146
+ expect(result.error).toBe('Login required');
147
+ });
148
+ ```
112
149
 
113
- **Problem:** Testing all combinations explodes.
150
+ ---
114
151
 
115
- **Example: Cross-browser testing**
152
+ ## Pairwise (Combinatorial) Testing
153
+
154
+ **Problem:** All combinations explode exponentially.
155
+
156
+ ```javascript
157
+ // Parameters:
158
+ // Browser: Chrome, Firefox, Safari (3)
159
+ // OS: Windows, Mac, Linux (3)
160
+ // Screen: Desktop, Tablet, Mobile (3)
161
+
162
+ // All combinations: 3 × 3 × 3 = 27 tests
163
+ // Pairwise: 9 tests cover all pairs
164
+
165
+ const pairwiseTests = [
166
+ { browser: 'Chrome', os: 'Windows', screen: 'Desktop' },
167
+ { browser: 'Chrome', os: 'Mac', screen: 'Tablet' },
168
+ { browser: 'Chrome', os: 'Linux', screen: 'Mobile' },
169
+ { browser: 'Firefox', os: 'Windows', screen: 'Tablet' },
170
+ { browser: 'Firefox', os: 'Mac', screen: 'Mobile' },
171
+ { browser: 'Firefox', os: 'Linux', screen: 'Desktop' },
172
+ { browser: 'Safari', os: 'Windows', screen: 'Mobile' },
173
+ { browser: 'Safari', os: 'Mac', screen: 'Desktop' },
174
+ { browser: 'Safari', os: 'Linux', screen: 'Tablet' }
175
+ ];
176
+ // Each pair appears at least once
116
177
  ```
117
- Browser: Chrome, Firefox, Safari (3)
118
- OS: Windows, Mac, Linux (3)
119
- Screen: Desktop, Tablet, Mobile (3)
120
178
 
121
- All combinations: 3 × 3 × 3 = 27 tests
179
+ ---
122
180
 
123
- Pairwise: 9 tests cover all pairs
124
- ```
181
+ ## Agent-Driven Test Design
125
182
 
126
- **With Agents:**
127
183
  ```typescript
128
- // qe-test-generator does pairwise reduction
129
- const tests = await agent.generatePairwiseTests({
184
+ // Auto-generate BVA tests
185
+ await Task("Generate BVA Tests", {
186
+ field: 'age',
187
+ dataType: 'integer',
188
+ constraints: { min: 18, max: 120 }
189
+ }, "qe-test-generator");
190
+ // Returns: 6 boundary test cases
191
+
192
+ // Auto-generate pairwise tests
193
+ await Task("Generate Pairwise Tests", {
130
194
  parameters: {
131
195
  browser: ['Chrome', 'Firefox', 'Safari'],
132
196
  os: ['Windows', 'Mac', 'Linux'],
133
197
  screen: ['Desktop', 'Tablet', 'Mobile']
134
198
  }
135
- });
199
+ }, "qe-test-generator");
136
200
  // Returns: 9-12 tests (vs 27 full combination)
137
201
  ```
138
202
 
203
+ ---
204
+
205
+ ## Agent Coordination Hints
206
+
207
+ ### Memory Namespace
208
+ ```
209
+ aqe/test-design/
210
+ ├── bva-analysis/* - Boundary value tests
211
+ ├── partitions/* - Equivalence partitions
212
+ ├── decision-tables/* - Decision table tests
213
+ └── pairwise/* - Combinatorial reduction
214
+ ```
215
+
216
+ ### Fleet Coordination
217
+ ```typescript
218
+ const designFleet = await FleetManager.coordinate({
219
+ strategy: 'systematic-test-design',
220
+ agents: [
221
+ 'qe-test-generator', // Apply design techniques
222
+ 'qe-coverage-analyzer', // Analyze coverage
223
+ 'qe-quality-analyzer' // Assess test quality
224
+ ],
225
+ topology: 'sequential'
226
+ });
227
+ ```
228
+
229
+ ---
230
+
139
231
  ## Related Skills
232
+ - [agentic-quality-engineering](../agentic-quality-engineering/) - Agent-driven testing
233
+ - [risk-based-testing](../risk-based-testing/) - Prioritize by risk
234
+ - [mutation-testing](../mutation-testing/) - Validate test effectiveness
140
235
 
141
- - [agentic-quality-engineering](../agentic-quality-engineering/)
142
- - [test-automation-strategy](../test-automation-strategy/)
143
- - [risk-based-testing](../risk-based-testing/)
236
+ ---
144
237
 
145
238
  ## Remember
146
239
 
147
- **Systematic design > Random testing**
240
+ **Systematic design > Random testing.** 40+ years of research shows these techniques find more bugs with fewer tests than ad-hoc approaches.
148
241
 
149
- - BVA finds boundary bugs
150
- - EP reduces redundant tests
151
- - Decision tables handle complexity
152
- - Pairwise reduces combinatorial explosion
242
+ **Combine techniques for comprehensive coverage.** BVA for boundaries, EP for partitions, decision tables for rules, pairwise for combinations.
153
243
 
154
- **With Agents:** `qe-test-generator` applies these techniques automatically, generating optimal test suites with maximum coverage and minimum redundancy.
244
+ **With Agents:** `qe-test-generator` applies these techniques automatically, generating optimal test suites with maximum coverage and minimum redundancy. Agents identify boundaries, partitions, and combinations from code analysis.
@@ -1,53 +1,70 @@
1
1
  ---
2
2
  name: test-environment-management
3
- 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.
3
+ 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."
4
+ category: specialized-testing
5
+ priority: medium
6
+ tokenEstimate: 900
7
+ agents: [qe-test-executor, qe-performance-tester, qe-chaos-engineer]
8
+ implementation_status: optimized
9
+ optimization_version: 1.0
10
+ last_optimized: 2025-12-02
11
+ dependencies: []
12
+ quick_reference_card: true
13
+ tags: [environment, docker, kubernetes, infrastructure, parity, cost-optimization]
4
14
  ---
5
15
 
6
16
  # Test Environment Management
7
17
 
8
- ## Core Principle
18
+ <default_to_action>
19
+ When managing test environments:
20
+ 1. DEFINE environment types (local, CI, staging, prod)
21
+ 2. CONTAINERIZE with Docker for consistency
22
+ 3. ENSURE parity with production (same versions, configs)
23
+ 4. MOCK external services (service virtualization)
24
+ 5. OPTIMIZE costs (auto-shutdown, spot instances)
25
+
26
+ **Quick Environment Checklist:**
27
+ - Same OS/versions as production
28
+ - Same database type and version
29
+ - Same configuration structure
30
+ - Containers for reproducibility
31
+ - Auto-shutdown after hours
32
+
33
+ **Critical Success Factors:**
34
+ - "Works on my machine" = environment inconsistency
35
+ - Infrastructure as Code = repeatable environments
36
+ - Service virtualization = test without external dependencies
37
+ </default_to_action>
38
+
39
+ ## Quick Reference Card
40
+
41
+ ### When to Use
42
+ - Setting up test infrastructure
43
+ - Debugging environment-specific failures
44
+ - Reducing test infrastructure costs
45
+ - Ensuring dev/prod parity
46
+
47
+ ### Environment Types
48
+ | Type | Purpose | Lifetime |
49
+ |------|---------|----------|
50
+ | **Local** | Fast feedback | Developer session |
51
+ | **CI** | Automated tests | Per build (ephemeral) |
52
+ | **Staging** | Pre-prod validation | Persistent |
53
+ | **Production** | Canary/synthetic | Continuous |
54
+
55
+ ### Dev/Prod Parity Checklist
56
+ | Item | Must Match |
57
+ |------|------------|
58
+ | OS | Same version |
59
+ | Database | Same type + version |
60
+ | Dependencies | Same versions |
61
+ | Config | Same structure |
62
+ | Env vars | Same names |
9
63
 
10
- **Unstable test environments = unreliable tests.**
11
-
12
- Test environment management ensures consistent, reproducible environments for testing while optimizing cost and maintenance.
13
-
14
- ## Environment Types
15
-
16
- ### Local Development
17
- ```
18
- Developer machine
19
- - Fast feedback
20
- - Full control
21
- - May differ from production
22
- ```
23
-
24
- ### CI Environment
25
- ```
26
- GitHub Actions, Jenkins, etc.
27
- - Automated tests
28
- - Ephemeral (created per build)
29
- - Must match production closely
30
- ```
31
-
32
- ### Staging/QA Environment
33
- ```
34
- Pre-production mirror
35
- - Integration testing
36
- - User acceptance testing
37
- - Should match production exactly
38
- ```
39
-
40
- ### Production (Testing in Prod)
41
- ```
42
- Real environment
43
- - Canary deployments
44
- - Feature flags
45
- - Synthetic monitoring
46
- ```
64
+ ---
47
65
 
48
66
  ## Docker for Test Environments
49
67
 
50
- **Containerize test dependencies:**
51
68
  ```yaml
52
69
  # docker-compose.test.yml
53
70
  version: '3.8'
@@ -69,13 +86,9 @@ services:
69
86
  environment:
70
87
  POSTGRES_DB: test
71
88
  POSTGRES_PASSWORD: password
72
- ports:
73
- - "5432:5432"
74
89
 
75
90
  redis:
76
91
  image: redis:7
77
- ports:
78
- - "6379:6379"
79
92
  ```
80
93
 
81
94
  **Run tests in container:**
@@ -85,9 +98,10 @@ docker-compose -f docker-compose.test.yml exec app npm test
85
98
  docker-compose -f docker-compose.test.yml down
86
99
  ```
87
100
 
101
+ ---
102
+
88
103
  ## Infrastructure as Code
89
104
 
90
- **Terraform for test environments:**
91
105
  ```hcl
92
106
  # test-environment.tf
93
107
  resource "aws_instance" "test_server" {
@@ -95,31 +109,27 @@ resource "aws_instance" "test_server" {
95
109
  instance_type = "t3.medium"
96
110
 
97
111
  tags = {
98
- Name = "test-environment"
99
- Environment = "test"
112
+ Name = "test-environment"
113
+ Environment = "test"
100
114
  AutoShutdown = "20:00" # Cost optimization
101
115
  }
102
116
  }
103
117
 
104
118
  resource "aws_rds_instance" "test_db" {
105
- allocated_storage = 20
106
- engine = "postgres"
107
- engine_version = "15"
108
- instance_class = "db.t3.micro"
109
- db_name = "test"
110
- username = "testuser"
111
- password = var.db_password
112
-
119
+ engine = "postgres"
120
+ engine_version = "15"
121
+ instance_class = "db.t3.micro"
113
122
  backup_retention_period = 0 # No backups needed for test
114
- skip_final_snapshot = true
123
+ skip_final_snapshot = true
115
124
  }
116
125
  ```
117
126
 
127
+ ---
128
+
118
129
  ## Service Virtualization
119
130
 
120
- **Mock external services:**
121
131
  ```javascript
122
- // Use WireMock for API mocking
132
+ // Mock external services with WireMock
123
133
  import { WireMock } from 'wiremock-captain';
124
134
 
125
135
  const wiremock = new WireMock('http://localhost:8080');
@@ -132,67 +142,102 @@ await wiremock.register({
132
142
  },
133
143
  response: {
134
144
  status: 200,
135
- jsonBody: {
136
- transactionId: '12345',
137
- status: 'approved'
138
- }
145
+ jsonBody: { transactionId: '12345', status: 'approved' }
139
146
  }
140
147
  });
141
148
 
142
149
  // Tests use mock instead of real gateway
143
150
  ```
144
151
 
145
- ## Environment Parity
146
-
147
- **Dev/Prod Parity Checklist:**
148
- - [ ] Same OS and versions
149
- - [ ] Same database type and version
150
- - [ ] Same dependency versions
151
- - [ ] Same configuration structure
152
- - [ ] Same environment variables
153
-
154
- **12-Factor App principles for parity**
152
+ ---
155
153
 
156
154
  ## Cost Optimization
157
155
 
158
- **Auto-shutdown test environments:**
159
156
  ```bash
160
- # Shutdown test environments after hours
161
- 0 20 * * * aws ec2 stop-instances --instance-ids $(aws ec2 describe-instances --filters "Name=tag:Environment,Values=test" --query "Reservations[].Instances[].InstanceId" --output text)
157
+ # Auto-shutdown test environments after hours
158
+ 0 20 * * * aws ec2 stop-instances --instance-ids $(aws ec2 describe-instances \
159
+ --filters "Name=tag:Environment,Values=test" \
160
+ --query "Reservations[].Instances[].InstanceId" --output text)
162
161
 
163
162
  # Start before work hours
164
- 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)
163
+ 0 7 * * 1-5 aws ec2 start-instances --instance-ids $(aws ec2 describe-instances \
164
+ --filters "Name=tag:Environment,Values=test" \
165
+ --query "Reservations[].Instances[].InstanceId" --output text)
165
166
  ```
166
167
 
167
- **Use spot instances for test workloads:**
168
+ **Use spot instances (70% savings):**
168
169
  ```hcl
169
170
  resource "aws_instance" "test_runner" {
170
- instance_type = "c5.2xlarge"
171
+ instance_type = "c5.2xlarge"
171
172
  instance_market_options {
172
173
  market_type = "spot"
173
174
  spot_options {
174
- max_price = "0.10" # Save 70% vs on-demand
175
+ max_price = "0.10"
175
176
  }
176
177
  }
177
178
  }
178
179
  ```
179
180
 
181
+ ---
182
+
183
+ ## Agent-Driven Environment Management
184
+
185
+ ```typescript
186
+ // Provision test environment
187
+ await Task("Environment Provisioning", {
188
+ type: 'integration-testing',
189
+ services: ['app', 'db', 'redis', 'mocks'],
190
+ parity: 'production',
191
+ lifetime: '2h'
192
+ }, "qe-test-executor");
193
+
194
+ // Chaos testing in isolated environment
195
+ await Task("Chaos Test Environment", {
196
+ baseline: 'staging',
197
+ isolate: true,
198
+ injectFaults: ['network-delay', 'pod-failure']
199
+ }, "qe-chaos-engineer");
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Agent Coordination Hints
205
+
206
+ ### Memory Namespace
207
+ ```
208
+ aqe/environment-management/
209
+ ├── configs/* - Environment configurations
210
+ ├── parity-checks/* - Dev/prod parity results
211
+ ├── cost-reports/* - Infrastructure costs
212
+ └── service-mocks/* - Service virtualization configs
213
+ ```
214
+
215
+ ### Fleet Coordination
216
+ ```typescript
217
+ const envFleet = await FleetManager.coordinate({
218
+ strategy: 'environment-management',
219
+ agents: [
220
+ 'qe-test-executor', // Provision environments
221
+ 'qe-performance-tester', // Environment performance
222
+ 'qe-chaos-engineer' // Resilience testing
223
+ ],
224
+ topology: 'sequential'
225
+ });
226
+ ```
227
+
228
+ ---
229
+
180
230
  ## Related Skills
231
+ - [test-data-management](../test-data-management/) - Data for environments
232
+ - [continuous-testing-shift-left](../continuous-testing-shift-left/) - CI/CD environments
233
+ - [chaos-engineering-resilience](../chaos-engineering-resilience/) - Environment resilience
181
234
 
182
- - [test-data-management](../test-data-management/)
183
- - [continuous-testing-shift-left](../continuous-testing-shift-left/)
184
- - [test-automation-strategy](../test-automation-strategy/)
235
+ ---
185
236
 
186
237
  ## Remember
187
238
 
188
- **Environment inconsistency = flaky tests.**
189
-
190
- "Works on my machine" problems from:
191
- - Different OS/versions
192
- - Missing dependencies
193
- - Configuration differences
194
- - Data differences
239
+ **Environment inconsistency = flaky tests.** "Works on my machine" problems come from: different OS/versions, missing dependencies, configuration differences, data differences.
195
240
 
196
- **Infrastructure as Code ensures repeatability.**
241
+ **Infrastructure as Code ensures repeatability.** Version control your environment configurations. Spin up identical environments on demand.
197
242
 
198
- **With Agents:** Agents automatically provision test environments, ensure parity with production, and optimize costs by auto-scaling and auto-shutdown.
243
+ **With Agents:** Agents automatically provision test environments matching production, ensure parity, mock external services, and optimize costs with auto-scaling and auto-shutdown.