agentic-qe 1.4.4 → 1.5.1

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 (390) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +133 -27
  2. package/.claude/agents/qe-api-contract-validator.md.backup +1148 -0
  3. package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +1148 -0
  4. package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +1123 -0
  5. package/.claude/agents/qe-chaos-engineer.md +142 -23
  6. package/.claude/agents/qe-chaos-engineer.md.backup +808 -0
  7. package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +808 -0
  8. package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +787 -0
  9. package/.claude/agents/qe-code-complexity.md +111 -23
  10. package/.claude/agents/qe-code-complexity.md.backup +291 -0
  11. package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +291 -0
  12. package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +286 -0
  13. package/.claude/agents/qe-coverage-analyzer.md +306 -30
  14. package/.claude/agents/qe-coverage-analyzer.md.backup +467 -0
  15. package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +467 -0
  16. package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +438 -0
  17. package/.claude/agents/qe-deployment-readiness.md +84 -28
  18. package/.claude/agents/qe-deployment-readiness.md.backup +1166 -0
  19. package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +1166 -0
  20. package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +1140 -0
  21. package/.claude/agents/qe-flaky-test-hunter.md +277 -35
  22. package/.claude/agents/qe-flaky-test-hunter.md.backup +1195 -0
  23. package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +1195 -0
  24. package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +1162 -0
  25. package/.claude/agents/qe-fleet-commander.md +126 -23
  26. package/.claude/agents/qe-fleet-commander.md.backup +718 -0
  27. package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +718 -0
  28. package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +697 -0
  29. package/.claude/agents/qe-performance-tester.md +314 -57
  30. package/.claude/agents/qe-performance-tester.md.backup +428 -0
  31. package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +428 -0
  32. package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +372 -0
  33. package/.claude/agents/qe-production-intelligence.md +126 -27
  34. package/.claude/agents/qe-production-intelligence.md.backup +1219 -0
  35. package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +1219 -0
  36. package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +1194 -0
  37. package/.claude/agents/qe-quality-analyzer.md +127 -32
  38. package/.claude/agents/qe-quality-analyzer.md.backup +425 -0
  39. package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +425 -0
  40. package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +394 -0
  41. package/.claude/agents/qe-quality-gate.md +148 -33
  42. package/.claude/agents/qe-quality-gate.md.backup +446 -0
  43. package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +446 -0
  44. package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +415 -0
  45. package/.claude/agents/qe-regression-risk-analyzer.md +78 -27
  46. package/.claude/agents/qe-regression-risk-analyzer.md.backup +1009 -0
  47. package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +1009 -0
  48. package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +984 -0
  49. package/.claude/agents/qe-requirements-validator.md +131 -27
  50. package/.claude/agents/qe-requirements-validator.md.backup +748 -0
  51. package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +748 -0
  52. package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +723 -0
  53. package/.claude/agents/qe-security-scanner.md +137 -62
  54. package/.claude/agents/qe-security-scanner.md.backup +634 -0
  55. package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +634 -0
  56. package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +573 -0
  57. package/.claude/agents/qe-test-data-architect.md +129 -26
  58. package/.claude/agents/qe-test-data-architect.md.backup +1064 -0
  59. package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +1064 -0
  60. package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +1040 -0
  61. package/.claude/agents/qe-test-executor.md +165 -21
  62. package/.claude/agents/qe-test-executor.md.backup +389 -0
  63. package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +389 -0
  64. package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +369 -0
  65. package/.claude/agents/qe-test-generator.md +379 -34
  66. package/.claude/agents/qe-test-generator.md.backup +997 -0
  67. package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +997 -0
  68. package/.claude/agents/qe-visual-tester.md +236 -23
  69. package/.claude/agents/qe-visual-tester.md.backup +777 -0
  70. package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +777 -0
  71. package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +756 -0
  72. package/.claude/agents/subagents/qe-code-reviewer.md +59 -0
  73. package/.claude/agents/subagents/qe-data-generator.md +60 -0
  74. package/.claude/agents/subagents/qe-integration-tester.md +77 -0
  75. package/.claude/agents/subagents/qe-performance-validator.md +55 -0
  76. package/.claude/agents/subagents/qe-security-auditor.md +51 -0
  77. package/.claude/agents/subagents/qe-test-implementer.md +371 -0
  78. package/.claude/agents/subagents/qe-test-refactorer.md +510 -0
  79. package/.claude/agents/subagents/qe-test-writer.md +603 -0
  80. package/.claude/skills/accessibility-testing/SKILL.md +764 -777
  81. package/.claude/skills/agentic-quality-engineering/SKILL.md +0 -6
  82. package/.claude/skills/api-testing-patterns/SKILL.md +0 -12
  83. package/.claude/skills/bug-reporting-excellence/SKILL.md +0 -6
  84. package/.claude/skills/chaos-engineering-resilience/SKILL.md +0 -6
  85. package/.claude/skills/code-review-quality/SKILL.md +0 -6
  86. package/.claude/skills/compatibility-testing/SKILL.md +0 -6
  87. package/.claude/skills/compliance-testing/SKILL.md +0 -6
  88. package/.claude/skills/consultancy-practices/SKILL.md +0 -6
  89. package/.claude/skills/context-driven-testing/SKILL.md +0 -6
  90. package/.claude/skills/contract-testing/SKILL.md +0 -6
  91. package/.claude/skills/database-testing/SKILL.md +0 -6
  92. package/.claude/skills/exploratory-testing-advanced/SKILL.md +0 -6
  93. package/.claude/skills/holistic-testing-pact/SKILL.md +0 -6
  94. package/.claude/skills/localization-testing/SKILL.md +0 -6
  95. package/.claude/skills/mobile-testing/SKILL.md +535 -548
  96. package/.claude/skills/mutation-testing/SKILL.md +0 -6
  97. package/.claude/skills/performance-testing/SKILL.md +0 -6
  98. package/.claude/skills/quality-metrics/SKILL.md +0 -12
  99. package/.claude/skills/refactoring-patterns/SKILL.md +0 -6
  100. package/.claude/skills/regression-testing/SKILL.md +1033 -1045
  101. package/.claude/skills/risk-based-testing/SKILL.md +0 -12
  102. package/.claude/skills/security-testing/SKILL.md +0 -6
  103. package/.claude/skills/shift-left-testing/SKILL.md +529 -535
  104. package/.claude/skills/shift-right-testing/SKILL.md +585 -591
  105. package/.claude/skills/tdd-london-chicago/SKILL.md +0 -6
  106. package/.claude/skills/technical-writing/SKILL.md +0 -6
  107. package/.claude/skills/test-automation-strategy/SKILL.md +0 -6
  108. package/.claude/skills/test-data-management/SKILL.md +1054 -1067
  109. package/.claude/skills/test-design-techniques/SKILL.md +0 -6
  110. package/.claude/skills/test-environment-management/SKILL.md +0 -6
  111. package/.claude/skills/test-reporting-analytics/SKILL.md +0 -6
  112. package/.claude/skills/visual-testing-advanced/SKILL.md +0 -6
  113. package/.claude/skills/xp-practices/SKILL.md +0 -6
  114. package/CHANGELOG.md +426 -5
  115. package/README.md +24 -19
  116. package/dist/cli/commands/init.d.ts +4 -0
  117. package/dist/cli/commands/init.d.ts.map +1 -1
  118. package/dist/cli/commands/init.js +97 -44
  119. package/dist/cli/commands/init.js.map +1 -1
  120. package/dist/mcp/handlers/coordination/index.d.ts +14 -14
  121. package/dist/mcp/handlers/coordination/index.d.ts.map +1 -1
  122. package/dist/mcp/handlers/coordination/index.js +14 -14
  123. package/dist/mcp/handlers/coordination/index.js.map +1 -1
  124. package/dist/mcp/handlers/phase2/Phase2Tools.d.ts.map +1 -1
  125. package/dist/mcp/handlers/phase2/Phase2Tools.js +39 -10
  126. package/dist/mcp/handlers/phase2/Phase2Tools.js.map +1 -1
  127. package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts +63 -0
  128. package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts.map +1 -0
  129. package/dist/mcp/handlers/phase3/Phase3DomainTools.js +885 -0
  130. package/dist/mcp/handlers/phase3/Phase3DomainTools.js.map +1 -0
  131. package/dist/mcp/handlers/phase3/index.d.ts +6 -0
  132. package/dist/mcp/handlers/phase3/index.d.ts.map +1 -0
  133. package/dist/mcp/handlers/phase3/index.js +10 -0
  134. package/dist/mcp/handlers/phase3/index.js.map +1 -0
  135. package/dist/mcp/handlers/prediction/index.d.ts +10 -10
  136. package/dist/mcp/handlers/prediction/index.d.ts.map +1 -1
  137. package/dist/mcp/handlers/prediction/index.js +10 -10
  138. package/dist/mcp/handlers/prediction/index.js.map +1 -1
  139. package/dist/mcp/handlers/security/check-authz.d.ts +152 -0
  140. package/dist/mcp/handlers/security/check-authz.d.ts.map +1 -0
  141. package/dist/mcp/handlers/security/check-authz.js +434 -0
  142. package/dist/mcp/handlers/security/check-authz.js.map +1 -0
  143. package/dist/mcp/handlers/security/generate-report.d.ts +156 -0
  144. package/dist/mcp/handlers/security/generate-report.d.ts.map +1 -0
  145. package/dist/mcp/handlers/security/generate-report.js +469 -0
  146. package/dist/mcp/handlers/security/generate-report.js.map +1 -0
  147. package/dist/mcp/handlers/security/index.d.ts +80 -0
  148. package/dist/mcp/handlers/security/index.d.ts.map +1 -0
  149. package/dist/mcp/handlers/security/index.js +91 -0
  150. package/dist/mcp/handlers/security/index.js.map +1 -0
  151. package/dist/mcp/handlers/security/scan-comprehensive.d.ts +66 -0
  152. package/dist/mcp/handlers/security/scan-comprehensive.d.ts.map +1 -0
  153. package/dist/mcp/handlers/security/scan-comprehensive.js +296 -0
  154. package/dist/mcp/handlers/security/scan-comprehensive.js.map +1 -0
  155. package/dist/mcp/handlers/security/scan-dependencies.d.ts +148 -0
  156. package/dist/mcp/handlers/security/scan-dependencies.d.ts.map +1 -0
  157. package/dist/mcp/handlers/security/scan-dependencies.js +354 -0
  158. package/dist/mcp/handlers/security/scan-dependencies.js.map +1 -0
  159. package/dist/mcp/handlers/security/validate-auth.d.ts +128 -0
  160. package/dist/mcp/handlers/security/validate-auth.d.ts.map +1 -0
  161. package/dist/mcp/handlers/security/validate-auth.js +294 -0
  162. package/dist/mcp/handlers/security/validate-auth.js.map +1 -0
  163. package/dist/mcp/handlers/test/generate-integration-tests.d.ts +95 -0
  164. package/dist/mcp/handlers/test/generate-integration-tests.d.ts.map +1 -0
  165. package/dist/mcp/handlers/test/generate-integration-tests.js +286 -0
  166. package/dist/mcp/handlers/test/generate-integration-tests.js.map +1 -0
  167. package/dist/mcp/handlers/test/generate-unit-tests.d.ts +89 -0
  168. package/dist/mcp/handlers/test/generate-unit-tests.d.ts.map +1 -0
  169. package/dist/mcp/handlers/test/generate-unit-tests.js +273 -0
  170. package/dist/mcp/handlers/test/generate-unit-tests.js.map +1 -0
  171. package/dist/mcp/handlers/test/optimize-test-suite.d.ts +97 -0
  172. package/dist/mcp/handlers/test/optimize-test-suite.d.ts.map +1 -0
  173. package/dist/mcp/handlers/test/optimize-test-suite.js +282 -0
  174. package/dist/mcp/handlers/test/optimize-test-suite.js.map +1 -0
  175. package/dist/mcp/server.d.ts.map +1 -1
  176. package/dist/mcp/server.js +211 -0
  177. package/dist/mcp/server.js.map +1 -1
  178. package/dist/mcp/tools/deprecated.d.ts +1390 -0
  179. package/dist/mcp/tools/deprecated.d.ts.map +1 -0
  180. package/dist/mcp/tools/deprecated.js +859 -0
  181. package/dist/mcp/tools/deprecated.js.map +1 -0
  182. package/dist/mcp/tools/qe/api-contract/index.d.ts +138 -0
  183. package/dist/mcp/tools/qe/api-contract/index.d.ts.map +1 -0
  184. package/dist/mcp/tools/qe/api-contract/index.js +572 -0
  185. package/dist/mcp/tools/qe/api-contract/index.js.map +1 -0
  186. package/dist/mcp/tools/qe/code-quality/analyze-complexity.d.ts +110 -0
  187. package/dist/mcp/tools/qe/code-quality/analyze-complexity.d.ts.map +1 -0
  188. package/dist/mcp/tools/qe/code-quality/analyze-complexity.js +381 -0
  189. package/dist/mcp/tools/qe/code-quality/analyze-complexity.js.map +1 -0
  190. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.d.ts +115 -0
  191. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.d.ts.map +1 -0
  192. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.js +461 -0
  193. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.js.map +1 -0
  194. package/dist/mcp/tools/qe/code-quality/index.d.ts +12 -0
  195. package/dist/mcp/tools/qe/code-quality/index.d.ts.map +1 -0
  196. package/dist/mcp/tools/qe/code-quality/index.js +30 -0
  197. package/dist/mcp/tools/qe/code-quality/index.js.map +1 -0
  198. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.d.ts +58 -0
  199. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.d.ts.map +1 -0
  200. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.js +172 -0
  201. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.js.map +1 -0
  202. package/dist/mcp/tools/qe/coverage/calculate-trends.d.ts +73 -0
  203. package/dist/mcp/tools/qe/coverage/calculate-trends.d.ts.map +1 -0
  204. package/dist/mcp/tools/qe/coverage/calculate-trends.js +240 -0
  205. package/dist/mcp/tools/qe/coverage/calculate-trends.js.map +1 -0
  206. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.d.ts +38 -0
  207. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.d.ts.map +1 -0
  208. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.js +204 -0
  209. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.js.map +1 -0
  210. package/dist/mcp/tools/qe/coverage/index.d.ts +12 -0
  211. package/dist/mcp/tools/qe/coverage/index.d.ts.map +1 -0
  212. package/dist/mcp/tools/qe/coverage/index.js +23 -0
  213. package/dist/mcp/tools/qe/coverage/index.js.map +1 -0
  214. package/dist/mcp/tools/qe/coverage/recommend-tests.d.ts +46 -0
  215. package/dist/mcp/tools/qe/coverage/recommend-tests.d.ts.map +1 -0
  216. package/dist/mcp/tools/qe/coverage/recommend-tests.js +248 -0
  217. package/dist/mcp/tools/qe/coverage/recommend-tests.js.map +1 -0
  218. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.d.ts +179 -0
  219. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.d.ts.map +1 -0
  220. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.js +554 -0
  221. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.js.map +1 -0
  222. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.d.ts +172 -0
  223. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.d.ts.map +1 -0
  224. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.js +498 -0
  225. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.js.map +1 -0
  226. package/dist/mcp/tools/qe/flaky-detection/index.d.ts +35 -0
  227. package/dist/mcp/tools/qe/flaky-detection/index.d.ts.map +1 -0
  228. package/dist/mcp/tools/qe/flaky-detection/index.js +66 -0
  229. package/dist/mcp/tools/qe/flaky-detection/index.js.map +1 -0
  230. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.d.ts +159 -0
  231. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.d.ts.map +1 -0
  232. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.js +462 -0
  233. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.js.map +1 -0
  234. package/dist/mcp/tools/qe/fleet/index.d.ts +422 -0
  235. package/dist/mcp/tools/qe/fleet/index.d.ts.map +1 -0
  236. package/dist/mcp/tools/qe/fleet/index.js +652 -0
  237. package/dist/mcp/tools/qe/fleet/index.js.map +1 -0
  238. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.d.ts +180 -0
  239. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.d.ts.map +1 -0
  240. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.js +347 -0
  241. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.js.map +1 -0
  242. package/dist/mcp/tools/qe/performance/generate-report.d.ts +146 -0
  243. package/dist/mcp/tools/qe/performance/generate-report.d.ts.map +1 -0
  244. package/dist/mcp/tools/qe/performance/generate-report.js +354 -0
  245. package/dist/mcp/tools/qe/performance/generate-report.js.map +1 -0
  246. package/dist/mcp/tools/qe/performance/index.d.ts +13 -0
  247. package/dist/mcp/tools/qe/performance/index.d.ts.map +1 -0
  248. package/dist/mcp/tools/qe/performance/index.js +24 -0
  249. package/dist/mcp/tools/qe/performance/index.js.map +1 -0
  250. package/dist/mcp/tools/qe/performance/monitor-realtime.d.ts +120 -0
  251. package/dist/mcp/tools/qe/performance/monitor-realtime.d.ts.map +1 -0
  252. package/dist/mcp/tools/qe/performance/monitor-realtime.js +215 -0
  253. package/dist/mcp/tools/qe/performance/monitor-realtime.js.map +1 -0
  254. package/dist/mcp/tools/qe/performance/run-benchmark.d.ts +68 -0
  255. package/dist/mcp/tools/qe/performance/run-benchmark.d.ts.map +1 -0
  256. package/dist/mcp/tools/qe/performance/run-benchmark.js +120 -0
  257. package/dist/mcp/tools/qe/performance/run-benchmark.js.map +1 -0
  258. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.d.ts +239 -0
  259. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.d.ts.map +1 -0
  260. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.js +671 -0
  261. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.js.map +1 -0
  262. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts +219 -0
  263. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts.map +1 -0
  264. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js +732 -0
  265. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js.map +1 -0
  266. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.d.ts +447 -0
  267. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.d.ts.map +1 -0
  268. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.js +551 -0
  269. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.js.map +1 -0
  270. package/dist/mcp/tools/qe/quality-gates/index.d.ts +40 -0
  271. package/dist/mcp/tools/qe/quality-gates/index.d.ts.map +1 -0
  272. package/dist/mcp/tools/qe/quality-gates/index.js +56 -0
  273. package/dist/mcp/tools/qe/quality-gates/index.js.map +1 -0
  274. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.d.ts +226 -0
  275. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.d.ts.map +1 -0
  276. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.js +603 -0
  277. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.js.map +1 -0
  278. package/dist/mcp/tools/qe/regression/analyze-risk.d.ts +212 -0
  279. package/dist/mcp/tools/qe/regression/analyze-risk.d.ts.map +1 -0
  280. package/dist/mcp/tools/qe/regression/analyze-risk.js +617 -0
  281. package/dist/mcp/tools/qe/regression/analyze-risk.js.map +1 -0
  282. package/dist/mcp/tools/qe/regression/index.d.ts +36 -0
  283. package/dist/mcp/tools/qe/regression/index.d.ts.map +1 -0
  284. package/dist/mcp/tools/qe/regression/index.js +63 -0
  285. package/dist/mcp/tools/qe/regression/index.js.map +1 -0
  286. package/dist/mcp/tools/qe/regression/select-tests.d.ts +241 -0
  287. package/dist/mcp/tools/qe/regression/select-tests.d.ts.map +1 -0
  288. package/dist/mcp/tools/qe/regression/select-tests.js +601 -0
  289. package/dist/mcp/tools/qe/regression/select-tests.js.map +1 -0
  290. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.d.ts +134 -0
  291. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.d.ts.map +1 -0
  292. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.js +737 -0
  293. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.js.map +1 -0
  294. package/dist/mcp/tools/qe/requirements/index.d.ts +40 -0
  295. package/dist/mcp/tools/qe/requirements/index.d.ts.map +1 -0
  296. package/dist/mcp/tools/qe/requirements/index.js +84 -0
  297. package/dist/mcp/tools/qe/requirements/index.js.map +1 -0
  298. package/dist/mcp/tools/qe/requirements/validate-requirements.d.ts +196 -0
  299. package/dist/mcp/tools/qe/requirements/validate-requirements.d.ts.map +1 -0
  300. package/dist/mcp/tools/qe/requirements/validate-requirements.js +740 -0
  301. package/dist/mcp/tools/qe/requirements/validate-requirements.js.map +1 -0
  302. package/dist/mcp/tools/qe/security/detect-vulnerabilities.d.ts +300 -0
  303. package/dist/mcp/tools/qe/security/detect-vulnerabilities.d.ts.map +1 -0
  304. package/dist/mcp/tools/qe/security/detect-vulnerabilities.js +492 -0
  305. package/dist/mcp/tools/qe/security/detect-vulnerabilities.js.map +1 -0
  306. package/dist/mcp/tools/qe/security/index.d.ts +34 -0
  307. package/dist/mcp/tools/qe/security/index.d.ts.map +1 -0
  308. package/dist/mcp/tools/qe/security/index.js +44 -0
  309. package/dist/mcp/tools/qe/security/index.js.map +1 -0
  310. package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts +240 -0
  311. package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts.map +1 -0
  312. package/dist/mcp/tools/qe/security/scan-comprehensive.js +557 -0
  313. package/dist/mcp/tools/qe/security/scan-comprehensive.js.map +1 -0
  314. package/dist/mcp/tools/qe/security/validate-compliance.d.ts +299 -0
  315. package/dist/mcp/tools/qe/security/validate-compliance.d.ts.map +1 -0
  316. package/dist/mcp/tools/qe/security/validate-compliance.js +517 -0
  317. package/dist/mcp/tools/qe/security/validate-compliance.js.map +1 -0
  318. package/dist/mcp/tools/qe/shared/types.d.ts +840 -0
  319. package/dist/mcp/tools/qe/shared/types.d.ts.map +1 -0
  320. package/dist/mcp/tools/qe/shared/types.js +13 -0
  321. package/dist/mcp/tools/qe/shared/types.js.map +1 -0
  322. package/dist/mcp/tools/qe/test-data/analyze-schema.d.ts +264 -0
  323. package/dist/mcp/tools/qe/test-data/analyze-schema.d.ts.map +1 -0
  324. package/dist/mcp/tools/qe/test-data/analyze-schema.js +553 -0
  325. package/dist/mcp/tools/qe/test-data/analyze-schema.js.map +1 -0
  326. package/dist/mcp/tools/qe/test-data/generate-test-data.d.ts +167 -0
  327. package/dist/mcp/tools/qe/test-data/generate-test-data.d.ts.map +1 -0
  328. package/dist/mcp/tools/qe/test-data/generate-test-data.js +336 -0
  329. package/dist/mcp/tools/qe/test-data/generate-test-data.js.map +1 -0
  330. package/dist/mcp/tools/qe/test-data/index.d.ts +44 -0
  331. package/dist/mcp/tools/qe/test-data/index.d.ts.map +1 -0
  332. package/dist/mcp/tools/qe/test-data/index.js +90 -0
  333. package/dist/mcp/tools/qe/test-data/index.js.map +1 -0
  334. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.d.ts +165 -0
  335. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.d.ts.map +1 -0
  336. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.js +342 -0
  337. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.js.map +1 -0
  338. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.d.ts +144 -0
  339. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.d.ts.map +1 -0
  340. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.js +432 -0
  341. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.js.map +1 -0
  342. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.d.ts +98 -0
  343. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.d.ts.map +1 -0
  344. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.js +459 -0
  345. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.js.map +1 -0
  346. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.d.ts +83 -0
  347. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.d.ts.map +1 -0
  348. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.js +483 -0
  349. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.js.map +1 -0
  350. package/dist/mcp/tools/qe/test-generation/index.d.ts +56 -0
  351. package/dist/mcp/tools/qe/test-generation/index.d.ts.map +1 -0
  352. package/dist/mcp/tools/qe/test-generation/index.js +97 -0
  353. package/dist/mcp/tools/qe/test-generation/index.js.map +1 -0
  354. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.d.ts +124 -0
  355. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.d.ts.map +1 -0
  356. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.js +362 -0
  357. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.js.map +1 -0
  358. package/dist/mcp/tools/qe/visual/compare-screenshots.d.ts +119 -0
  359. package/dist/mcp/tools/qe/visual/compare-screenshots.d.ts.map +1 -0
  360. package/dist/mcp/tools/qe/visual/compare-screenshots.js +280 -0
  361. package/dist/mcp/tools/qe/visual/compare-screenshots.js.map +1 -0
  362. package/dist/mcp/tools/qe/visual/detect-regression.d.ts +138 -0
  363. package/dist/mcp/tools/qe/visual/detect-regression.d.ts.map +1 -0
  364. package/dist/mcp/tools/qe/visual/detect-regression.js +271 -0
  365. package/dist/mcp/tools/qe/visual/detect-regression.js.map +1 -0
  366. package/dist/mcp/tools/qe/visual/index.d.ts +16 -0
  367. package/dist/mcp/tools/qe/visual/index.d.ts.map +1 -0
  368. package/dist/mcp/tools/qe/visual/index.js +22 -0
  369. package/dist/mcp/tools/qe/visual/index.js.map +1 -0
  370. package/dist/mcp/tools/qe/visual/validate-accessibility.d.ts +276 -0
  371. package/dist/mcp/tools/qe/visual/validate-accessibility.d.ts.map +1 -0
  372. package/dist/mcp/tools/qe/visual/validate-accessibility.js +413 -0
  373. package/dist/mcp/tools/qe/visual/validate-accessibility.js.map +1 -0
  374. package/dist/mcp/tools.d.ts +44 -0
  375. package/dist/mcp/tools.d.ts.map +1 -1
  376. package/dist/mcp/tools.js +1980 -1
  377. package/dist/mcp/tools.js.map +1 -1
  378. package/package.json +2 -2
  379. package/dist/learning/__mocks__/LearningEngine.d.ts +0 -39
  380. package/dist/learning/__mocks__/LearningEngine.d.ts.map +0 -1
  381. package/dist/learning/__mocks__/LearningEngine.js +0 -116
  382. package/dist/learning/__mocks__/LearningEngine.js.map +0 -1
  383. package/dist/utils/__mocks__/Database.d.ts +0 -85
  384. package/dist/utils/__mocks__/Database.d.ts.map +0 -1
  385. package/dist/utils/__mocks__/Database.js +0 -125
  386. package/dist/utils/__mocks__/Database.js.map +0 -1
  387. package/dist/utils/__mocks__/Logger.d.ts +0 -26
  388. package/dist/utils/__mocks__/Logger.d.ts.map +0 -1
  389. package/dist/utils/__mocks__/Logger.js +0 -44
  390. package/dist/utils/__mocks__/Logger.js.map +0 -1
@@ -1,1045 +1,1033 @@
1
- ---
2
- name: regression-testing
3
- description: Strategic regression testing with test selection, impact analysis, and continuous regression management. Use when verifying fixes don't break existing functionality, planning regression suites, or optimizing test execution for faster feedback.
4
- version: 1.0.0
5
- category: testing
6
- tags:
7
- - regression-testing
8
- - test-selection
9
- - impact-analysis
10
- - change-based-testing
11
- - continuous-testing
12
- - test-optimization
13
- difficulty: intermediate
14
- estimated_time: 60-90 minutes
15
- author: agentic-qe
16
- ---
17
-
18
- # Regression Testing
19
-
20
- ## Core Principle
21
-
22
- **Every fix is a risk. Every change can break something.**
23
-
24
- Regression testing ensures that new changes don't break existing functionality. It's not about testing everything - it's about smartly testing what matters when changes occur.
25
-
26
- ## What is Regression Testing?
27
-
28
- **Regression:** Re-running tests after changes to verify existing functionality still works.
29
-
30
- **Why needed:**
31
- - Bug fixes can introduce new bugs
32
- - New features can break old features
33
- - Refactoring can change behavior
34
- - Dependency updates can cause failures
35
- - Environmental changes affect functionality
36
-
37
- **Goal:** Catch unintended side effects early and cheaply.
38
-
39
- ## Types of Regression Testing
40
-
41
- ### 1. Corrective Regression (No Code Change)
42
-
43
- **When:** No changes to code, just re-running existing tests
44
-
45
- **Use case:**
46
- - Environment change (new database version)
47
- - Configuration change
48
- - Infrastructure update
49
- - Verifying test stability
50
-
51
- **Strategy:** Re-run full existing test suite
52
-
53
- **Example:**
54
- ```bash
55
- # After upgrading Node.js from 18 to 20
56
- npm test # Run all tests to ensure nothing broke
57
- ```
58
-
59
- ### 2. Progressive Regression (New Features)
60
-
61
- **When:** New features added, existing tests still valid
62
-
63
- **Strategy:**
64
- - Run existing regression suite
65
- - Add new tests for new features
66
- - Focus on integration points with existing code
67
-
68
- **Example:**
69
- ```
70
- New Feature: Social login
71
- Regression Focus:
72
- Existing email login still works
73
- User profile creation unchanged
74
- Session management compatible
75
- ✓ New social login tests added
76
- ```
77
-
78
- ### 3. Selective Regression (Targeted Testing)
79
-
80
- **When:** Specific modules changed, test only impacted areas
81
-
82
- **Strategy:**
83
- - Analyze code changes
84
- - Identify dependent modules
85
- - Run tests for changed + dependent code
86
- - Skip unrelated tests
87
-
88
- **Benefits:**
89
- - Faster feedback (minutes vs hours)
90
- - Resource efficient
91
- - Scales to large codebases
92
-
93
- **Example:**
94
- ```typescript
95
- // Payment module changed
96
- // Run tests for:
97
- - payment.test.ts
98
- - checkout.test.ts (depends on payment)
99
- - order-confirmation.test.ts (depends on payment)
100
- // Skip unrelated:
101
- - user-profile.test.ts (no dependency)
102
- - search.test.ts ✗ (no dependency)
103
- ```
104
-
105
- ### 4. Complete Regression (Full Suite)
106
-
107
- **When:**
108
- - Major refactoring
109
- - Before release
110
- - After significant changes
111
- - Periodic confidence check
112
-
113
- **Strategy:** Run every test in the suite
114
-
115
- **Timing:**
116
- - Nightly builds
117
- - Weekly full regression
118
- - Pre-release validation
119
-
120
- ### 5. Partial Regression (Risk-Based)
121
-
122
- **When:** Time-constrained, need quick validation
123
-
124
- **Strategy:**
125
- - Run critical path tests
126
- - Run high-risk area tests
127
- - Run frequently failing tests
128
- - Skip low-priority tests
129
-
130
- **Example:**
131
- ```
132
- High Priority (always run):
133
- ✓ Login/authentication
134
- Payment processing
135
- ✓ Data integrity checks
136
-
137
- Medium Priority (run if time):
138
- User profile management
139
- ✓ Search functionality
140
-
141
- Low Priority (skip in quick regression):
142
- Admin panel features
143
- Reporting dashboards
144
- ```
145
-
146
- ## Test Selection Strategies
147
-
148
- ### Strategy 1: Change-Based Selection
149
-
150
- **Analyze what changed, test accordingly**
151
-
152
- ```typescript
153
- // PR changes:
154
- - src/services/payment.ts
155
- - src/utils/currency.ts
156
-
157
- // Select tests covering:
158
- - payment.test.ts
159
- - currency.test.ts
160
- - integration/checkout.test.ts (uses payment)
161
- - e2e/purchase-flow.test.ts ✓ (exercises payment)
162
- ```
163
-
164
- **Tools:**
165
- - Git diff analysis
166
- - Code coverage mapping
167
- - Dependency graphs
168
-
169
- **Benefits:**
170
- - Fast feedback (5-10 min vs 2 hours)
171
- - 70-90% defect detection
172
- - Scalable to large suites
173
-
174
- ### Strategy 2: Risk-Based Selection
175
-
176
- **Prioritize based on failure risk and impact**
177
-
178
- ```typescript
179
- Risk Score = Probability of Failure × Impact
180
-
181
- High Risk:
182
- - Payment processing (critical + complex)
183
- - Authentication (critical + frequently changed)
184
- - Data migration (high impact)
185
-
186
- Medium Risk:
187
- - User profile (moderate impact)
188
- - Search (stable code)
189
-
190
- Low Risk:
191
- - Help documentation (low impact + stable)
192
- ```
193
-
194
- ### Strategy 3: Historical Failure Analysis
195
-
196
- **Test what breaks frequently**
197
-
198
- ```typescript
199
- // Track test failures over last 30 days
200
- const flakyTests = [
201
- 'checkout.test.ts - 15 failures',
202
- 'auth.test.ts - 12 failures',
203
- 'api-integration.test.ts - 8 failures'
204
- ];
205
-
206
- // Always include in regression
207
- ```
208
-
209
- ### Strategy 4: Code Coverage-Based
210
-
211
- **Test code with poor existing coverage**
212
-
213
- ```typescript
214
- // Coverage analysis
215
- payment.ts: 45% coverage High priority for regression
216
- checkout.ts: 85% coverage → Medium priority
217
- utils.ts: 95% coverage Low priority
218
-
219
- // Focus regression on under-tested code
220
- ```
221
-
222
- ### Strategy 5: Time-Budget Selection
223
-
224
- **Fixed time window, maximize value**
225
-
226
- ```typescript
227
- // You have 15 minutes
228
- const testPriority = [
229
- { test: 'critical-paths', time: '5 min', value: 'high' },
230
- { test: 'payment-flows', time: '3 min', value: 'high' },
231
- { test: 'auth-flows', time: '2 min', value: 'high' },
232
- { test: 'search', time: '2 min', value: 'medium' },
233
- { test: 'profiles', time: '3 min', value: 'medium' }
234
- ];
235
-
236
- // Run until time budget exhausted
237
- // Total: 15 min, covering all high-value tests
238
- ```
239
-
240
- ## Building a Regression Suite
241
-
242
- ### Phase 1: Seed with Critical Tests
243
-
244
- Start with smoke tests - does basic functionality work?
245
-
246
- ```javascript
247
- // Smoke test suite (5-10 min)
248
- describe('Smoke Tests', () => {
249
- test('App starts without errors', () => {
250
- expect(app.isRunning()).toBe(true);
251
- });
252
-
253
- test('Database connection works', () => {
254
- expect(db.isConnected()).toBe(true);
255
- });
256
-
257
- test('Critical API endpoints respond', () => {
258
- expect(api.health()).toBe('OK');
259
- });
260
-
261
- test('User can login', () => {
262
- login('test@example.com', 'password');
263
- expect(session.isActive()).toBe(true);
264
- });
265
- });
266
- ```
267
-
268
- ### Phase 2: Add Happy Path Tests
269
-
270
- Cover main user workflows end-to-end.
271
-
272
- ```javascript
273
- // Happy path suite (20-30 min)
274
- describe('Core User Journeys', () => {
275
- test('User can sign up and verify email', async () => {
276
- await signup('new@example.com', 'SecurePass123!');
277
- const email = await getLatestEmail('new@example.com');
278
- await verifyEmail(email.verificationLink);
279
- expect(user.isVerified()).toBe(true);
280
- });
281
-
282
- test('User can complete purchase', async () => {
283
- await login();
284
- await addToCart(product);
285
- await checkout();
286
- await submitPayment(validCard);
287
- expect(order.status()).toBe('completed');
288
- });
289
- });
290
- ```
291
-
292
- ### Phase 3: Add Edge Cases and Error Scenarios
293
-
294
- ```javascript
295
- // Edge case suite (30-45 min)
296
- describe('Edge Cases', () => {
297
- test('Handles expired credit card', async () => {
298
- await checkout();
299
- await submitPayment(expiredCard);
300
- expect(error.message()).toContain('Card expired');
301
- });
302
-
303
- test('Handles concurrent checkout attempts', async () => {
304
- const promises = [
305
- checkout(user1),
306
- checkout(user1) // Same user, same time
307
- ];
308
- const results = await Promise.all(promises);
309
- expect(results.filter(r => r.success).length).toBe(1);
310
- });
311
- });
312
- ```
313
-
314
- ### Phase 4: Add Integration Tests
315
-
316
- ```javascript
317
- // Integration suite (45-60 min)
318
- describe('System Integration', () => {
319
- test('Payment gateway integration works', async () => {
320
- const result = await paymentGateway.charge(card, amount);
321
- expect(result.status).toBe('succeeded');
322
- expect(db.transaction).toHaveBeenRecorded();
323
- expect(email.receipt).toHaveBeenSent();
324
- });
325
-
326
- test('Inventory sync with warehouse', async () => {
327
- await purchaseProduct(product);
328
- const inventory = await warehouse.checkStock(product.id);
329
- expect(inventory.quantity).toBe(originalQuantity - 1);
330
- });
331
- });
332
- ```
333
-
334
- ### Regression Suite Pyramid
335
-
336
- ```
337
- /\
338
- / \ Full Regression (weekly)
339
- / \ - All tests (2-4 hours)
340
- /------\
341
- / \ Extended Regression (nightly)
342
- / \ - All unit + integration + critical E2E (30-60 min)
343
- /------------\
344
- / \ Quick Regression (per commit)
345
- /________________\ - Changed code tests + smoke tests (5-10 min)
346
- ```
347
-
348
- ## Test Impact Analysis
349
-
350
- ### Mapping Tests to Code
351
-
352
- **Build dependency graph:**
353
-
354
- ```typescript
355
- // Track which tests cover which code
356
- const testCoverage = {
357
- 'payment.ts': [
358
- 'payment.test.ts',
359
- 'checkout.integration.test.ts',
360
- 'e2e/purchase.test.ts'
361
- ],
362
- 'user.ts': [
363
- 'user.test.ts',
364
- 'auth.integration.test.ts',
365
- 'e2e/signup.test.ts'
366
- ]
367
- };
368
-
369
- // When payment.ts changes, run all related tests
370
- function selectTests(changedFiles) {
371
- const testsToRun = new Set();
372
- changedFiles.forEach(file => {
373
- testCoverage[file]?.forEach(test => testsToRun.add(test));
374
- });
375
- return Array.from(testsToRun);
376
- }
377
- ```
378
-
379
- ### Transitive Dependencies
380
-
381
- **Account for indirect dependencies:**
382
-
383
- ```typescript
384
- // Direct dependency
385
- payment.ts → uses → currency.ts
386
-
387
- // Transitive dependency
388
- checkout.ts → uses → payment.ts uses → currency.ts
389
-
390
- // When currency.ts changes, test:
391
- - currency.test.ts (direct)
392
- - payment.test.ts (direct dependency on currency)
393
- - checkout.test.ts (transitive dependency)
394
- ```
395
-
396
- ### Static Analysis for Test Selection
397
-
398
- ```typescript
399
- // Analyze imports to build dependency graph
400
- import ts from 'typescript';
401
-
402
- function findDependencies(sourceFile: string): string[] {
403
- const program = ts.createProgram([sourceFile], {});
404
- const checker = program.getTypeChecker();
405
-
406
- // Extract all imports
407
- const dependencies = [];
408
- const sourceFileObj = program.getSourceFile(sourceFile);
409
-
410
- ts.forEachChild(sourceFileObj, node => {
411
- if (ts.isImportDeclaration(node)) {
412
- dependencies.push(node.moduleSpecifier.text);
413
- }
414
- });
415
-
416
- return dependencies;
417
- }
418
- ```
419
-
420
- ## Regression Test Optimization
421
-
422
- ### Technique 1: Test Parallelization
423
-
424
- **Run tests concurrently for faster feedback**
425
-
426
- ```javascript
427
- // Sequential: 60 min
428
- test1(); // 20 min
429
- test2(); // 20 min
430
- test3(); // 20 min
431
-
432
- // Parallel: 20 min
433
- Promise.all([
434
- test1(), // 20 min
435
- test2(), // 20 min
436
- test3() // 20 min
437
- ]);
438
-
439
- // Jest configuration
440
- module.exports = {
441
- maxWorkers: '50%', // Use half CPU cores
442
- testTimeout: 30000
443
- };
444
- ```
445
-
446
- ### Technique 2: Test Sharding
447
-
448
- **Distribute tests across multiple machines**
449
-
450
- ```yaml
451
- # CI pipeline with 4 workers
452
- jobs:
453
- test:
454
- strategy:
455
- matrix:
456
- shard: [1, 2, 3, 4]
457
- steps:
458
- - run: npm test -- --shard=${{ matrix.shard }}/4
459
-
460
- # Each worker runs 25% of tests
461
- # Total time: 60 min / 4 = 15 min
462
- ```
463
-
464
- ### Technique 3: Incremental Testing
465
-
466
- **Test only what changed since last run**
467
-
468
- ```typescript
469
- // Track test results
470
- const lastRun = {
471
- timestamp: '2025-10-24T10:00:00Z',
472
- passed: ['test1', 'test2', 'test3'],
473
- failed: []
474
- };
475
-
476
- // Current run
477
- const currentChanges = ['payment.ts', 'checkout.ts'];
478
-
479
- // Run:
480
- // 1. Tests for changed code (payment, checkout)
481
- // 2. Tests that failed last time (if any)
482
- // Skip tests that passed last time for unchanged code
483
- ```
484
-
485
- ### Technique 4: Smoke Test Fast Fail
486
-
487
- **Run fastest, most critical tests first**
488
-
489
- ```yaml
490
- # CI Pipeline
491
- stages:
492
- - smoke-test: # 2 min
493
- - critical-paths
494
- - fail-fast: true # Stop if smoke fails
495
-
496
- - quick-regression: # 10 min
497
- - changed-code-tests
498
- - fail-fast: true
499
-
500
- - full-regression: # 60 min
501
- - all-tests
502
- - fail-fast: false # Run all to find all issues
503
- ```
504
-
505
- ### Technique 5: Test Flakiness Removal
506
-
507
- **Eliminate unreliable tests**
508
-
509
- ```typescript
510
- // Track test stability over 100 runs
511
- const testStability = {
512
- 'reliable-test': { runs: 100, passes: 100, passRate: 1.00 },
513
- 'flaky-test': { runs: 100, passes: 87, passRate: 0.87 },
514
- 'unstable-test': { runs: 100, passes: 64, passRate: 0.64 }
515
- };
516
-
517
- // Strategy:
518
- // passRate >= 0.98 → Keep in regression suite
519
- // passRate 0.90-0.98 → Fix flakiness
520
- // passRate < 0.90 → Quarantine until fixed
521
-
522
- // Flaky tests waste time and reduce confidence
523
- ```
524
-
525
- ## Continuous Regression Testing
526
-
527
- ### Regression in CI/CD Pipeline
528
-
529
- ```yaml
530
- # .github/workflows/regression.yml
531
- name: Regression Testing
532
-
533
- on:
534
- pull_request:
535
- branches: [main]
536
- push:
537
- branches: [main]
538
- schedule:
539
- - cron: '0 2 * * *' # Nightly at 2 AM
540
-
541
- jobs:
542
- quick-regression:
543
- name: Quick Regression (per PR)
544
- runs-on: ubuntu-latest
545
- timeout-minutes: 15
546
- steps:
547
- - uses: actions/checkout@v3
548
- - name: Changed file analysis
549
- id: changes
550
- uses: dorny/paths-filter@v2
551
- with:
552
- filters: |
553
- payment:
554
- - 'src/payment/**'
555
- auth:
556
- - 'src/auth/**'
557
-
558
- - name: Run affected tests
559
- run: |
560
- npm run test:payment
561
- npm run test:auth
562
- if: steps.changes.outputs.payment == 'true' || steps.changes.outputs.auth == 'true'
563
-
564
- - name: Smoke tests (always)
565
- run: npm run test:smoke
566
-
567
- nightly-regression:
568
- name: Nightly Full Regression
569
- runs-on: ubuntu-latest
570
- timeout-minutes: 120
571
- if: github.event_name == 'schedule'
572
- steps:
573
- - name: Run all tests
574
- run: npm test
575
-
576
- - name: Coverage report
577
- run: npm run coverage
578
-
579
- - name: Upload results
580
- uses: actions/upload-artifact@v3
581
- with:
582
- name: regression-results
583
- path: test-results/
584
- ```
585
-
586
- ### Pre-Commit Regression
587
-
588
- **Local regression before committing**
589
-
590
- ```bash
591
- # .git/hooks/pre-commit
592
- #!/bin/bash
593
-
594
- echo "Running quick regression tests..."
595
-
596
- # Get staged files
597
- STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".ts$")
598
-
599
- if [ -z "$STAGED_FILES" ]; then
600
- echo "No TypeScript files changed, skipping tests"
601
- exit 0
602
- fi
603
-
604
- # Run tests for changed files
605
- npm run test:changed -- $STAGED_FILES
606
-
607
- if [ $? -ne 0 ]; then
608
- echo "❌ Regression tests failed. Commit aborted."
609
- exit 1
610
- fi
611
-
612
- echo "✅ Regression tests passed"
613
- exit 0
614
- ```
615
-
616
- ### Pre-Deployment Regression
617
-
618
- **Final validation before production**
619
-
620
- ```yaml
621
- # Deployment pipeline
622
- deploy:
623
- steps:
624
- - name: Production smoke tests
625
- run: npm run test:smoke:production
626
- env:
627
- API_URL: https://staging.example.com
628
-
629
- - name: Critical path regression
630
- run: npm run test:critical-paths
631
-
632
- - name: Security regression
633
- run: npm run test:security
634
-
635
- - name: Performance baseline check
636
- run: npm run test:performance
637
-
638
- - name: Deploy to production
639
- if: success()
640
- run: ./deploy.sh production
641
- ```
642
-
643
- ## Regression Test Maintenance
644
-
645
- ### Anti-Pattern: Test Rot
646
-
647
- **Problem:** Tests become outdated, irrelevant, or broken
648
-
649
- ```javascript
650
- // BAD: Outdated test
651
- test('User can pay with PayPal', () => {
652
- // PayPal integration removed 6 months ago
653
- // Test still exists but is meaningless
654
- });
655
-
656
- // GOOD: Remove obsolete tests
657
- // Delete test when feature is removed
658
- ```
659
-
660
- ### Strategy: Regular Test Review
661
-
662
- ```markdown
663
- ## Quarterly Test Audit
664
-
665
- Review each test:
666
- - [ ] Is feature still in product?
667
- - [ ] Does test provide value?
668
- - [ ] Is test reliable (not flaky)?
669
- - [ ] Is test documented/understandable?
670
- - [ ] Execution time acceptable?
671
-
672
- Actions:
673
- - Delete: Obsolete tests
674
- - Fix: Flaky tests
675
- - Optimize: Slow tests
676
- - Document: Unclear tests
677
- - Consolidate: Duplicate tests
678
- ```
679
-
680
- ### Strategy: Test Suite Metrics
681
-
682
- ```typescript
683
- interface TestSuiteHealth {
684
- totalTests: number;
685
- executionTime: string;
686
- passRate: number;
687
- flakiness: number;
688
- coverage: number;
689
- lastUpdated: Date;
690
- }
691
-
692
- const regressionHealth: TestSuiteHealth = {
693
- totalTests: 1247,
694
- executionTime: '18 min',
695
- passRate: 0.987, // 98.7% pass rate
696
- flakiness: 0.013, // 1.3% flaky tests (target: <2%)
697
- coverage: 0.82, // 82% code coverage
698
- lastUpdated: new Date('2025-10-24')
699
- };
700
-
701
- // Track over time
702
- // Trend: execution time ↑ → need optimization
703
- // Trend: flakiness ↑ → need stabilization
704
- // Trend: coverage ↓ → add tests for new code
705
- ```
706
-
707
- ### Strategy: Test Ownership
708
-
709
- ```typescript
710
- // tests/payment/checkout.test.ts
711
- /**
712
- * @owner team-payments
713
- * @created 2025-06-15
714
- * @criticality high
715
- * @executionTime 45s
716
- * @lastReview 2025-09-20
717
- *
718
- * Tests the complete checkout flow including:
719
- * - Cart validation
720
- * - Payment processing
721
- * - Order confirmation
722
- * - Email receipt
723
- */
724
-
725
- // Benefits:
726
- // - Clear responsibility for maintenance
727
- // - Context for why test exists
728
- // - Trigger for regular review
729
- ```
730
-
731
- ## Regression Testing Best Practices
732
-
733
- ### ✅ DO: Automate Regression Tests
734
-
735
- **Manual regression doesn't scale**
736
-
737
- ```typescript
738
- // Automated regression runs on every PR
739
- // Catches issues in minutes, not days
740
- ```
741
-
742
- ### ✅ DO: Use Descriptive Test Names
743
-
744
- ```javascript
745
- // BAD
746
- test('test1', () => { ... });
747
-
748
- // GOOD
749
- test('checkout fails gracefully when payment gateway is down', () => {
750
- mockPaymentGateway.simulateOutage();
751
- const result = await checkout(cart);
752
- expect(result.status).toBe('payment-failed');
753
- expect(result.userMessage).toContain('payment service unavailable');
754
- });
755
- ```
756
-
757
- ### ✅ DO: Keep Tests Independent
758
-
759
- ```javascript
760
- // BAD: Tests depend on execution order
761
- test('create user', () => {
762
- user = createUser('test@example.com');
763
- });
764
-
765
- test('user can login', () => {
766
- login(user); // Fails if previous test didn't run
767
- });
768
-
769
- // GOOD: Each test independent
770
- test('user can login', () => {
771
- const user = createUser('test@example.com'); // Setup in test
772
- login(user);
773
- expect(session.isActive()).toBe(true);
774
- });
775
- ```
776
-
777
- ### ✅ DO: Use Setup/Teardown
778
-
779
- ```javascript
780
- describe('Payment Tests', () => {
781
- beforeEach(async () => {
782
- // Clean slate for each test
783
- await db.clean();
784
- await db.seed(testData);
785
- });
786
-
787
- afterEach(async () => {
788
- // Cleanup
789
- await db.clean();
790
- });
791
-
792
- test('payment succeeds with valid card', async () => {
793
- // Test has clean environment
794
- });
795
- });
796
- ```
797
-
798
- ### ❌ DON'T: Test Everything, Every Time
799
-
800
- ```typescript
801
- // DON'T run 4-hour full regression on every commit
802
- // DO run smart selection based on changes
803
- ```
804
-
805
- ### DON'T: Ignore Flaky Tests
806
-
807
- ```typescript
808
- // DON'T keep flaky tests and ignore failures
809
- // DO fix or quarantine flaky tests immediately
810
- ```
811
-
812
- ### ❌ DON'T: Duplicate Test Coverage
813
-
814
- ```typescript
815
- // DON'T test same thing at multiple levels
816
- // Unit test: currency conversion logic
817
- // Integration test: currency conversion in payment
818
- // E2E test: full purchase with currency conversion
819
-
820
- // DO test each concern at appropriate level
821
- // Unit: Conversion logic
822
- // Integration: Payment service uses conversion correctly
823
- // E2E: Happy path only (one currency conversion example)
824
- ```
825
-
826
- ## Using with QE Agents
827
-
828
- ### Intelligent Test Selection
829
-
830
- **qe-regression-risk-analyzer** performs smart test selection:
831
-
832
- ```typescript
833
- // Analyze PR for regression risk
834
- const analysis = await agent.analyzeRegressionRisk({
835
- pr: 1234,
836
- strategy: 'change-based-with-risk',
837
- timebudget: '15min'
838
- });
839
-
840
- // Returns:
841
- // {
842
- // mustRun: ['payment.test.ts', 'checkout.integration.test.ts'],
843
- // shouldRun: ['order.test.ts', 'inventory.test.ts'],
844
- // canSkip: ['profile.test.ts', 'search.test.ts'],
845
- // estimatedTime: '12 min',
846
- // riskCoverage: 0.94
847
- // }
848
- ```
849
-
850
- ### Automated Test Generation for Regression
851
-
852
- **qe-test-generator** creates regression tests from bugs:
853
-
854
- ```typescript
855
- // Bug found in production
856
- const bug = {
857
- id: 'BUG-567',
858
- description: 'Checkout fails when user has > 100 items in cart',
859
- severity: 'high'
860
- };
861
-
862
- // Agent generates regression test
863
- await agent.generateRegressionTest({
864
- bug: bug,
865
- preventRecurrence: true
866
- });
867
-
868
- // Creates:
869
- // tests/regression/BUG-567-large-cart.test.ts
870
- test('checkout succeeds with 100+ items in cart', async () => {
871
- const cart = generateCart(150); // Edge case that failed
872
- const result = await checkout(cart);
873
- expect(result.status).toBe('success');
874
- });
875
- ```
876
-
877
- ### Continuous Regression Monitoring
878
-
879
- **qe-quality-analyzer** tracks regression suite health:
880
-
881
- ```typescript
882
- // Monitor regression suite metrics
883
- const health = await agent.analyzeRegressionHealth({
884
- suite: 'main-regression',
885
- period: '30d'
886
- });
887
-
888
- // Returns insights:
889
- // {
890
- // executionTimeTrend: 'increasing', // ⚠️ Getting slower
891
- // flakinessRate: 0.03, // ⚠️ Above 2% threshold
892
- // coverageTrend: 'stable', // ✅ Maintaining coverage
893
- // recommendations: [
894
- // 'Parallelize slow tests',
895
- // 'Fix 12 flaky tests',
896
- // 'Remove 5 obsolete tests'
897
- // ]
898
- // }
899
- ```
900
-
901
- ### Regression Testing in CI/CD
902
-
903
- **qe-test-executor** orchestrates regression runs:
904
-
905
- ```typescript
906
- // Execute smart regression in CI pipeline
907
- await agent.executeRegression({
908
- trigger: 'pull-request',
909
- strategy: 'selective',
910
- changedFiles: ['src/payment/stripe.ts', 'src/models/order.ts'],
911
- parallel: true,
912
- failFast: false
913
- });
914
-
915
- // Execution plan:
916
- // 1. Analyze changed files
917
- // 2. Select impacted tests (change-based)
918
- // 3. Add critical path tests (risk-based)
919
- // 4. Run in parallel across 4 workers
920
- // 5. Report results with coverage metrics
921
- ```
922
-
923
- ### Visual Regression Testing
924
-
925
- **qe-visual-tester** catches UI regressions:
926
-
927
- ```typescript
928
- // Detect visual changes after code update
929
- await agent.visualRegression({
930
- baseline: 'main-branch',
931
- current: 'feature-branch',
932
- pages: ['checkout', 'product-detail', 'cart'],
933
- threshold: 0.01 // 1% pixel difference tolerance
934
- });
935
-
936
- // Returns:
937
- // {
938
- // changed: ['checkout-page'],
939
- // diff: {
940
- // 'checkout-page': {
941
- // pixelDifference: 234,
942
- // percentageChange: 0.023,
943
- // screenshot: 'diff-checkout.png',
944
- // verdict: 'review-required'
945
- // }
946
- // }
947
- // }
948
- ```
949
-
950
- ### Fleet-Coordinated Regression
951
-
952
- ```typescript
953
- // Multiple agents collaborate on regression testing
954
- const regressionFleet = await FleetManager.coordinate({
955
- strategy: 'comprehensive-regression',
956
- agents: [
957
- 'qe-regression-risk-analyzer', // 1. Analyze changes, select tests
958
- 'qe-test-generator', // 2. Generate missing regression tests
959
- 'qe-test-executor', // 3. Execute selected tests
960
- 'qe-coverage-analyzer', // 4. Analyze coverage gaps
961
- 'qe-visual-tester', // 5. Check visual regressions
962
- 'qe-quality-gate' // 6. Make GO/NO-GO decision
963
- ],
964
- topology: 'sequential'
965
- });
966
-
967
- // Execute full regression workflow
968
- const result = await regressionFleet.execute({
969
- pr: 1234,
970
- release: 'v3.2.0',
971
- riskTolerance: 'low'
972
- });
973
-
974
- // Returns comprehensive regression report
975
- ```
976
-
977
- ### Production Regression Detection
978
-
979
- **qe-production-intelligence** detects regressions in production:
980
-
981
- ```typescript
982
- // Monitor production for regression signals
983
- await agent.detectProductionRegression({
984
- baseline: 'v3.1.0',
985
- current: 'v3.2.0',
986
- metrics: ['error-rate', 'latency', 'conversion'],
987
- alertThreshold: 0.1 // 10% degradation
988
- });
989
-
990
- // Alerts if:
991
- // - Error rate increases > 10%
992
- // - Latency degrades > 10%
993
- // - Conversion drops > 10%
994
-
995
- // Enables fast rollback before major impact
996
- ```
997
-
998
- ---
999
-
1000
- ## Related Skills
1001
-
1002
- **Core Quality Practices:**
1003
- - [agentic-quality-engineering](../agentic-quality-engineering/) - Agent-driven regression orchestration
1004
- - [holistic-testing-pact](../holistic-testing-pact/) - Regression across test quadrants
1005
- - [risk-based-testing](../risk-based-testing/) - Risk-based regression prioritization
1006
-
1007
- **Testing Approaches:**
1008
- - [test-automation-strategy](../test-automation-strategy/) - Building automation pyramid with regression
1009
- - [api-testing-patterns](../api-testing-patterns/) - API regression testing
1010
- - [exploratory-testing-advanced](../exploratory-testing-advanced/) - Exploratory regression sessions
1011
- - [performance-testing](../performance-testing/) - Performance regression testing
1012
- - [security-testing](../security-testing/) - Security regression scans
1013
-
1014
- **Development Practices:**
1015
- - [tdd-london-chicago](../tdd-london-chicago/) - Test-first creates regression safety
1016
- - [xp-practices](../xp-practices/) - Continuous integration with regression
1017
- - [refactoring-patterns](../refactoring-patterns/) - Safe refactoring with regression coverage
1018
-
1019
- **Communication:**
1020
- - [quality-metrics](../quality-metrics/) - Regression test effectiveness metrics
1021
- - [bug-reporting-excellence](../bug-reporting-excellence/) - Regression test creation from bugs
1022
-
1023
- ---
1024
-
1025
- ## Remember
1026
-
1027
- **Regression testing is insurance against change.**
1028
-
1029
- Every code change is a risk. Regression testing mitigates that risk by:
1030
- - Verifying existing functionality still works
1031
- - Catching unintended side effects early
1032
- - Building confidence for continuous deployment
1033
- - Enabling safe refactoring and evolution
1034
-
1035
- **Good regression testing is strategic, not exhaustive.**
1036
-
1037
- You cannot test everything, every time. Smart regression testing:
1038
- - Selects tests based on changes and risk
1039
- - Runs fast enough for continuous feedback
1040
- - Maintains reliability (no flaky tests)
1041
- - Evolves with the product
1042
-
1043
- **Perfect regression coverage is impossible. Effective regression testing is achievable.**
1044
-
1045
- **With Agents**: Agents excel at intelligent test selection, impact analysis, automated test generation from bugs, and continuous regression monitoring. Use agents to make regression testing data-driven, efficient, and scalable.
1
+ ---
2
+ name: regression-testing
3
+ description: Strategic regression testing with test selection, impact analysis, and continuous regression management. Use when verifying fixes don't break existing functionality, planning regression suites, or optimizing test execution for faster feedback.
4
+ ---
5
+
6
+ # Regression Testing
7
+
8
+ ## Core Principle
9
+
10
+ **Every fix is a risk. Every change can break something.**
11
+
12
+ Regression testing ensures that new changes don't break existing functionality. It's not about testing everything - it's about smartly testing what matters when changes occur.
13
+
14
+ ## What is Regression Testing?
15
+
16
+ **Regression:** Re-running tests after changes to verify existing functionality still works.
17
+
18
+ **Why needed:**
19
+ - Bug fixes can introduce new bugs
20
+ - New features can break old features
21
+ - Refactoring can change behavior
22
+ - Dependency updates can cause failures
23
+ - Environmental changes affect functionality
24
+
25
+ **Goal:** Catch unintended side effects early and cheaply.
26
+
27
+ ## Types of Regression Testing
28
+
29
+ ### 1. Corrective Regression (No Code Change)
30
+
31
+ **When:** No changes to code, just re-running existing tests
32
+
33
+ **Use case:**
34
+ - Environment change (new database version)
35
+ - Configuration change
36
+ - Infrastructure update
37
+ - Verifying test stability
38
+
39
+ **Strategy:** Re-run full existing test suite
40
+
41
+ **Example:**
42
+ ```bash
43
+ # After upgrading Node.js from 18 to 20
44
+ npm test # Run all tests to ensure nothing broke
45
+ ```
46
+
47
+ ### 2. Progressive Regression (New Features)
48
+
49
+ **When:** New features added, existing tests still valid
50
+
51
+ **Strategy:**
52
+ - Run existing regression suite
53
+ - Add new tests for new features
54
+ - Focus on integration points with existing code
55
+
56
+ **Example:**
57
+ ```
58
+ New Feature: Social login
59
+ Regression Focus:
60
+ ✓ Existing email login still works
61
+ User profile creation unchanged
62
+ ✓ Session management compatible
63
+ ✓ New social login tests added
64
+ ```
65
+
66
+ ### 3. Selective Regression (Targeted Testing)
67
+
68
+ **When:** Specific modules changed, test only impacted areas
69
+
70
+ **Strategy:**
71
+ - Analyze code changes
72
+ - Identify dependent modules
73
+ - Run tests for changed + dependent code
74
+ - Skip unrelated tests
75
+
76
+ **Benefits:**
77
+ - Faster feedback (minutes vs hours)
78
+ - Resource efficient
79
+ - Scales to large codebases
80
+
81
+ **Example:**
82
+ ```typescript
83
+ // Payment module changed
84
+ // Run tests for:
85
+ - payment.test.ts
86
+ - checkout.test.ts (depends on payment)
87
+ - order-confirmation.test.ts ✓ (depends on payment)
88
+ // Skip unrelated:
89
+ - user-profile.test.ts (no dependency)
90
+ - search.test.ts ✗ (no dependency)
91
+ ```
92
+
93
+ ### 4. Complete Regression (Full Suite)
94
+
95
+ **When:**
96
+ - Major refactoring
97
+ - Before release
98
+ - After significant changes
99
+ - Periodic confidence check
100
+
101
+ **Strategy:** Run every test in the suite
102
+
103
+ **Timing:**
104
+ - Nightly builds
105
+ - Weekly full regression
106
+ - Pre-release validation
107
+
108
+ ### 5. Partial Regression (Risk-Based)
109
+
110
+ **When:** Time-constrained, need quick validation
111
+
112
+ **Strategy:**
113
+ - Run critical path tests
114
+ - Run high-risk area tests
115
+ - Run frequently failing tests
116
+ - Skip low-priority tests
117
+
118
+ **Example:**
119
+ ```
120
+ High Priority (always run):
121
+ ✓ Login/authentication
122
+ Payment processing
123
+ ✓ Data integrity checks
124
+
125
+ Medium Priority (run if time):
126
+ User profile management
127
+ Search functionality
128
+
129
+ Low Priority (skip in quick regression):
130
+ ✗ Admin panel features
131
+ ✗ Reporting dashboards
132
+ ```
133
+
134
+ ## Test Selection Strategies
135
+
136
+ ### Strategy 1: Change-Based Selection
137
+
138
+ **Analyze what changed, test accordingly**
139
+
140
+ ```typescript
141
+ // PR changes:
142
+ - src/services/payment.ts
143
+ - src/utils/currency.ts
144
+
145
+ // Select tests covering:
146
+ - payment.test.ts
147
+ - currency.test.ts ✓
148
+ - integration/checkout.test.ts (uses payment)
149
+ - e2e/purchase-flow.test.ts ✓ (exercises payment)
150
+ ```
151
+
152
+ **Tools:**
153
+ - Git diff analysis
154
+ - Code coverage mapping
155
+ - Dependency graphs
156
+
157
+ **Benefits:**
158
+ - Fast feedback (5-10 min vs 2 hours)
159
+ - 70-90% defect detection
160
+ - Scalable to large suites
161
+
162
+ ### Strategy 2: Risk-Based Selection
163
+
164
+ **Prioritize based on failure risk and impact**
165
+
166
+ ```typescript
167
+ Risk Score = Probability of Failure × Impact
168
+
169
+ High Risk:
170
+ - Payment processing (critical + complex)
171
+ - Authentication (critical + frequently changed)
172
+ - Data migration (high impact)
173
+
174
+ Medium Risk:
175
+ - User profile (moderate impact)
176
+ - Search (stable code)
177
+
178
+ Low Risk:
179
+ - Help documentation (low impact + stable)
180
+ ```
181
+
182
+ ### Strategy 3: Historical Failure Analysis
183
+
184
+ **Test what breaks frequently**
185
+
186
+ ```typescript
187
+ // Track test failures over last 30 days
188
+ const flakyTests = [
189
+ 'checkout.test.ts - 15 failures',
190
+ 'auth.test.ts - 12 failures',
191
+ 'api-integration.test.ts - 8 failures'
192
+ ];
193
+
194
+ // Always include in regression
195
+ ```
196
+
197
+ ### Strategy 4: Code Coverage-Based
198
+
199
+ **Test code with poor existing coverage**
200
+
201
+ ```typescript
202
+ // Coverage analysis
203
+ payment.ts: 45% coverage → High priority for regression
204
+ checkout.ts: 85% coverage → Medium priority
205
+ utils.ts: 95% coverage → Low priority
206
+
207
+ // Focus regression on under-tested code
208
+ ```
209
+
210
+ ### Strategy 5: Time-Budget Selection
211
+
212
+ **Fixed time window, maximize value**
213
+
214
+ ```typescript
215
+ // You have 15 minutes
216
+ const testPriority = [
217
+ { test: 'critical-paths', time: '5 min', value: 'high' },
218
+ { test: 'payment-flows', time: '3 min', value: 'high' },
219
+ { test: 'auth-flows', time: '2 min', value: 'high' },
220
+ { test: 'search', time: '2 min', value: 'medium' },
221
+ { test: 'profiles', time: '3 min', value: 'medium' }
222
+ ];
223
+
224
+ // Run until time budget exhausted
225
+ // Total: 15 min, covering all high-value tests
226
+ ```
227
+
228
+ ## Building a Regression Suite
229
+
230
+ ### Phase 1: Seed with Critical Tests
231
+
232
+ Start with smoke tests - does basic functionality work?
233
+
234
+ ```javascript
235
+ // Smoke test suite (5-10 min)
236
+ describe('Smoke Tests', () => {
237
+ test('App starts without errors', () => {
238
+ expect(app.isRunning()).toBe(true);
239
+ });
240
+
241
+ test('Database connection works', () => {
242
+ expect(db.isConnected()).toBe(true);
243
+ });
244
+
245
+ test('Critical API endpoints respond', () => {
246
+ expect(api.health()).toBe('OK');
247
+ });
248
+
249
+ test('User can login', () => {
250
+ login('test@example.com', 'password');
251
+ expect(session.isActive()).toBe(true);
252
+ });
253
+ });
254
+ ```
255
+
256
+ ### Phase 2: Add Happy Path Tests
257
+
258
+ Cover main user workflows end-to-end.
259
+
260
+ ```javascript
261
+ // Happy path suite (20-30 min)
262
+ describe('Core User Journeys', () => {
263
+ test('User can sign up and verify email', async () => {
264
+ await signup('new@example.com', 'SecurePass123!');
265
+ const email = await getLatestEmail('new@example.com');
266
+ await verifyEmail(email.verificationLink);
267
+ expect(user.isVerified()).toBe(true);
268
+ });
269
+
270
+ test('User can complete purchase', async () => {
271
+ await login();
272
+ await addToCart(product);
273
+ await checkout();
274
+ await submitPayment(validCard);
275
+ expect(order.status()).toBe('completed');
276
+ });
277
+ });
278
+ ```
279
+
280
+ ### Phase 3: Add Edge Cases and Error Scenarios
281
+
282
+ ```javascript
283
+ // Edge case suite (30-45 min)
284
+ describe('Edge Cases', () => {
285
+ test('Handles expired credit card', async () => {
286
+ await checkout();
287
+ await submitPayment(expiredCard);
288
+ expect(error.message()).toContain('Card expired');
289
+ });
290
+
291
+ test('Handles concurrent checkout attempts', async () => {
292
+ const promises = [
293
+ checkout(user1),
294
+ checkout(user1) // Same user, same time
295
+ ];
296
+ const results = await Promise.all(promises);
297
+ expect(results.filter(r => r.success).length).toBe(1);
298
+ });
299
+ });
300
+ ```
301
+
302
+ ### Phase 4: Add Integration Tests
303
+
304
+ ```javascript
305
+ // Integration suite (45-60 min)
306
+ describe('System Integration', () => {
307
+ test('Payment gateway integration works', async () => {
308
+ const result = await paymentGateway.charge(card, amount);
309
+ expect(result.status).toBe('succeeded');
310
+ expect(db.transaction).toHaveBeenRecorded();
311
+ expect(email.receipt).toHaveBeenSent();
312
+ });
313
+
314
+ test('Inventory sync with warehouse', async () => {
315
+ await purchaseProduct(product);
316
+ const inventory = await warehouse.checkStock(product.id);
317
+ expect(inventory.quantity).toBe(originalQuantity - 1);
318
+ });
319
+ });
320
+ ```
321
+
322
+ ### Regression Suite Pyramid
323
+
324
+ ```
325
+ /\
326
+ / \ Full Regression (weekly)
327
+ / \ - All tests (2-4 hours)
328
+ /------\
329
+ / \ Extended Regression (nightly)
330
+ / \ - All unit + integration + critical E2E (30-60 min)
331
+ /------------\
332
+ / \ Quick Regression (per commit)
333
+ /________________\ - Changed code tests + smoke tests (5-10 min)
334
+ ```
335
+
336
+ ## Test Impact Analysis
337
+
338
+ ### Mapping Tests to Code
339
+
340
+ **Build dependency graph:**
341
+
342
+ ```typescript
343
+ // Track which tests cover which code
344
+ const testCoverage = {
345
+ 'payment.ts': [
346
+ 'payment.test.ts',
347
+ 'checkout.integration.test.ts',
348
+ 'e2e/purchase.test.ts'
349
+ ],
350
+ 'user.ts': [
351
+ 'user.test.ts',
352
+ 'auth.integration.test.ts',
353
+ 'e2e/signup.test.ts'
354
+ ]
355
+ };
356
+
357
+ // When payment.ts changes, run all related tests
358
+ function selectTests(changedFiles) {
359
+ const testsToRun = new Set();
360
+ changedFiles.forEach(file => {
361
+ testCoverage[file]?.forEach(test => testsToRun.add(test));
362
+ });
363
+ return Array.from(testsToRun);
364
+ }
365
+ ```
366
+
367
+ ### Transitive Dependencies
368
+
369
+ **Account for indirect dependencies:**
370
+
371
+ ```typescript
372
+ // Direct dependency
373
+ payment.ts uses → currency.ts
374
+
375
+ // Transitive dependency
376
+ checkout.ts → uses → payment.ts → uses → currency.ts
377
+
378
+ // When currency.ts changes, test:
379
+ - currency.test.ts (direct)
380
+ - payment.test.ts (direct dependency on currency)
381
+ - checkout.test.ts (transitive dependency)
382
+ ```
383
+
384
+ ### Static Analysis for Test Selection
385
+
386
+ ```typescript
387
+ // Analyze imports to build dependency graph
388
+ import ts from 'typescript';
389
+
390
+ function findDependencies(sourceFile: string): string[] {
391
+ const program = ts.createProgram([sourceFile], {});
392
+ const checker = program.getTypeChecker();
393
+
394
+ // Extract all imports
395
+ const dependencies = [];
396
+ const sourceFileObj = program.getSourceFile(sourceFile);
397
+
398
+ ts.forEachChild(sourceFileObj, node => {
399
+ if (ts.isImportDeclaration(node)) {
400
+ dependencies.push(node.moduleSpecifier.text);
401
+ }
402
+ });
403
+
404
+ return dependencies;
405
+ }
406
+ ```
407
+
408
+ ## Regression Test Optimization
409
+
410
+ ### Technique 1: Test Parallelization
411
+
412
+ **Run tests concurrently for faster feedback**
413
+
414
+ ```javascript
415
+ // Sequential: 60 min
416
+ test1(); // 20 min
417
+ test2(); // 20 min
418
+ test3(); // 20 min
419
+
420
+ // Parallel: 20 min
421
+ Promise.all([
422
+ test1(), // 20 min
423
+ test2(), // 20 min
424
+ test3() // 20 min
425
+ ]);
426
+
427
+ // Jest configuration
428
+ module.exports = {
429
+ maxWorkers: '50%', // Use half CPU cores
430
+ testTimeout: 30000
431
+ };
432
+ ```
433
+
434
+ ### Technique 2: Test Sharding
435
+
436
+ **Distribute tests across multiple machines**
437
+
438
+ ```yaml
439
+ # CI pipeline with 4 workers
440
+ jobs:
441
+ test:
442
+ strategy:
443
+ matrix:
444
+ shard: [1, 2, 3, 4]
445
+ steps:
446
+ - run: npm test -- --shard=${{ matrix.shard }}/4
447
+
448
+ # Each worker runs 25% of tests
449
+ # Total time: 60 min / 4 = 15 min
450
+ ```
451
+
452
+ ### Technique 3: Incremental Testing
453
+
454
+ **Test only what changed since last run**
455
+
456
+ ```typescript
457
+ // Track test results
458
+ const lastRun = {
459
+ timestamp: '2025-10-24T10:00:00Z',
460
+ passed: ['test1', 'test2', 'test3'],
461
+ failed: []
462
+ };
463
+
464
+ // Current run
465
+ const currentChanges = ['payment.ts', 'checkout.ts'];
466
+
467
+ // Run:
468
+ // 1. Tests for changed code (payment, checkout)
469
+ // 2. Tests that failed last time (if any)
470
+ // Skip tests that passed last time for unchanged code
471
+ ```
472
+
473
+ ### Technique 4: Smoke Test Fast Fail
474
+
475
+ **Run fastest, most critical tests first**
476
+
477
+ ```yaml
478
+ # CI Pipeline
479
+ stages:
480
+ - smoke-test: # 2 min
481
+ - critical-paths
482
+ - fail-fast: true # Stop if smoke fails
483
+
484
+ - quick-regression: # 10 min
485
+ - changed-code-tests
486
+ - fail-fast: true
487
+
488
+ - full-regression: # 60 min
489
+ - all-tests
490
+ - fail-fast: false # Run all to find all issues
491
+ ```
492
+
493
+ ### Technique 5: Test Flakiness Removal
494
+
495
+ **Eliminate unreliable tests**
496
+
497
+ ```typescript
498
+ // Track test stability over 100 runs
499
+ const testStability = {
500
+ 'reliable-test': { runs: 100, passes: 100, passRate: 1.00 },
501
+ 'flaky-test': { runs: 100, passes: 87, passRate: 0.87 },
502
+ 'unstable-test': { runs: 100, passes: 64, passRate: 0.64 }
503
+ };
504
+
505
+ // Strategy:
506
+ // passRate >= 0.98 → Keep in regression suite
507
+ // passRate 0.90-0.98 → Fix flakiness
508
+ // passRate < 0.90 → Quarantine until fixed
509
+
510
+ // Flaky tests waste time and reduce confidence
511
+ ```
512
+
513
+ ## Continuous Regression Testing
514
+
515
+ ### Regression in CI/CD Pipeline
516
+
517
+ ```yaml
518
+ # .github/workflows/regression.yml
519
+ name: Regression Testing
520
+
521
+ on:
522
+ pull_request:
523
+ branches: [main]
524
+ push:
525
+ branches: [main]
526
+ schedule:
527
+ - cron: '0 2 * * *' # Nightly at 2 AM
528
+
529
+ jobs:
530
+ quick-regression:
531
+ name: Quick Regression (per PR)
532
+ runs-on: ubuntu-latest
533
+ timeout-minutes: 15
534
+ steps:
535
+ - uses: actions/checkout@v3
536
+ - name: Changed file analysis
537
+ id: changes
538
+ uses: dorny/paths-filter@v2
539
+ with:
540
+ filters: |
541
+ payment:
542
+ - 'src/payment/**'
543
+ auth:
544
+ - 'src/auth/**'
545
+
546
+ - name: Run affected tests
547
+ run: |
548
+ npm run test:payment
549
+ npm run test:auth
550
+ if: steps.changes.outputs.payment == 'true' || steps.changes.outputs.auth == 'true'
551
+
552
+ - name: Smoke tests (always)
553
+ run: npm run test:smoke
554
+
555
+ nightly-regression:
556
+ name: Nightly Full Regression
557
+ runs-on: ubuntu-latest
558
+ timeout-minutes: 120
559
+ if: github.event_name == 'schedule'
560
+ steps:
561
+ - name: Run all tests
562
+ run: npm test
563
+
564
+ - name: Coverage report
565
+ run: npm run coverage
566
+
567
+ - name: Upload results
568
+ uses: actions/upload-artifact@v3
569
+ with:
570
+ name: regression-results
571
+ path: test-results/
572
+ ```
573
+
574
+ ### Pre-Commit Regression
575
+
576
+ **Local regression before committing**
577
+
578
+ ```bash
579
+ # .git/hooks/pre-commit
580
+ #!/bin/bash
581
+
582
+ echo "Running quick regression tests..."
583
+
584
+ # Get staged files
585
+ STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".ts$")
586
+
587
+ if [ -z "$STAGED_FILES" ]; then
588
+ echo "No TypeScript files changed, skipping tests"
589
+ exit 0
590
+ fi
591
+
592
+ # Run tests for changed files
593
+ npm run test:changed -- $STAGED_FILES
594
+
595
+ if [ $? -ne 0 ]; then
596
+ echo "❌ Regression tests failed. Commit aborted."
597
+ exit 1
598
+ fi
599
+
600
+ echo " Regression tests passed"
601
+ exit 0
602
+ ```
603
+
604
+ ### Pre-Deployment Regression
605
+
606
+ **Final validation before production**
607
+
608
+ ```yaml
609
+ # Deployment pipeline
610
+ deploy:
611
+ steps:
612
+ - name: Production smoke tests
613
+ run: npm run test:smoke:production
614
+ env:
615
+ API_URL: https://staging.example.com
616
+
617
+ - name: Critical path regression
618
+ run: npm run test:critical-paths
619
+
620
+ - name: Security regression
621
+ run: npm run test:security
622
+
623
+ - name: Performance baseline check
624
+ run: npm run test:performance
625
+
626
+ - name: Deploy to production
627
+ if: success()
628
+ run: ./deploy.sh production
629
+ ```
630
+
631
+ ## Regression Test Maintenance
632
+
633
+ ### Anti-Pattern: Test Rot
634
+
635
+ **Problem:** Tests become outdated, irrelevant, or broken
636
+
637
+ ```javascript
638
+ // BAD: Outdated test
639
+ test('User can pay with PayPal', () => {
640
+ // PayPal integration removed 6 months ago
641
+ // Test still exists but is meaningless
642
+ });
643
+
644
+ // GOOD: Remove obsolete tests
645
+ // Delete test when feature is removed
646
+ ```
647
+
648
+ ### Strategy: Regular Test Review
649
+
650
+ ```markdown
651
+ ## Quarterly Test Audit
652
+
653
+ Review each test:
654
+ - [ ] Is feature still in product?
655
+ - [ ] Does test provide value?
656
+ - [ ] Is test reliable (not flaky)?
657
+ - [ ] Is test documented/understandable?
658
+ - [ ] Execution time acceptable?
659
+
660
+ Actions:
661
+ - Delete: Obsolete tests
662
+ - Fix: Flaky tests
663
+ - Optimize: Slow tests
664
+ - Document: Unclear tests
665
+ - Consolidate: Duplicate tests
666
+ ```
667
+
668
+ ### Strategy: Test Suite Metrics
669
+
670
+ ```typescript
671
+ interface TestSuiteHealth {
672
+ totalTests: number;
673
+ executionTime: string;
674
+ passRate: number;
675
+ flakiness: number;
676
+ coverage: number;
677
+ lastUpdated: Date;
678
+ }
679
+
680
+ const regressionHealth: TestSuiteHealth = {
681
+ totalTests: 1247,
682
+ executionTime: '18 min',
683
+ passRate: 0.987, // 98.7% pass rate
684
+ flakiness: 0.013, // 1.3% flaky tests (target: <2%)
685
+ coverage: 0.82, // 82% code coverage
686
+ lastUpdated: new Date('2025-10-24')
687
+ };
688
+
689
+ // Track over time
690
+ // Trend: execution time ↑ → need optimization
691
+ // Trend: flakiness ↑ → need stabilization
692
+ // Trend: coverage → add tests for new code
693
+ ```
694
+
695
+ ### Strategy: Test Ownership
696
+
697
+ ```typescript
698
+ // tests/payment/checkout.test.ts
699
+ /**
700
+ * @owner team-payments
701
+ * @created 2025-06-15
702
+ * @criticality high
703
+ * @executionTime 45s
704
+ * @lastReview 2025-09-20
705
+ *
706
+ * Tests the complete checkout flow including:
707
+ * - Cart validation
708
+ * - Payment processing
709
+ * - Order confirmation
710
+ * - Email receipt
711
+ */
712
+
713
+ // Benefits:
714
+ // - Clear responsibility for maintenance
715
+ // - Context for why test exists
716
+ // - Trigger for regular review
717
+ ```
718
+
719
+ ## Regression Testing Best Practices
720
+
721
+ ### DO: Automate Regression Tests
722
+
723
+ **Manual regression doesn't scale**
724
+
725
+ ```typescript
726
+ // Automated regression runs on every PR
727
+ // Catches issues in minutes, not days
728
+ ```
729
+
730
+ ### ✅ DO: Use Descriptive Test Names
731
+
732
+ ```javascript
733
+ // BAD
734
+ test('test1', () => { ... });
735
+
736
+ // GOOD
737
+ test('checkout fails gracefully when payment gateway is down', () => {
738
+ mockPaymentGateway.simulateOutage();
739
+ const result = await checkout(cart);
740
+ expect(result.status).toBe('payment-failed');
741
+ expect(result.userMessage).toContain('payment service unavailable');
742
+ });
743
+ ```
744
+
745
+ ### ✅ DO: Keep Tests Independent
746
+
747
+ ```javascript
748
+ // BAD: Tests depend on execution order
749
+ test('create user', () => {
750
+ user = createUser('test@example.com');
751
+ });
752
+
753
+ test('user can login', () => {
754
+ login(user); // Fails if previous test didn't run
755
+ });
756
+
757
+ // GOOD: Each test independent
758
+ test('user can login', () => {
759
+ const user = createUser('test@example.com'); // Setup in test
760
+ login(user);
761
+ expect(session.isActive()).toBe(true);
762
+ });
763
+ ```
764
+
765
+ ### DO: Use Setup/Teardown
766
+
767
+ ```javascript
768
+ describe('Payment Tests', () => {
769
+ beforeEach(async () => {
770
+ // Clean slate for each test
771
+ await db.clean();
772
+ await db.seed(testData);
773
+ });
774
+
775
+ afterEach(async () => {
776
+ // Cleanup
777
+ await db.clean();
778
+ });
779
+
780
+ test('payment succeeds with valid card', async () => {
781
+ // Test has clean environment
782
+ });
783
+ });
784
+ ```
785
+
786
+ ### ❌ DON'T: Test Everything, Every Time
787
+
788
+ ```typescript
789
+ // DON'T run 4-hour full regression on every commit
790
+ // DO run smart selection based on changes
791
+ ```
792
+
793
+ ### DON'T: Ignore Flaky Tests
794
+
795
+ ```typescript
796
+ // DON'T keep flaky tests and ignore failures
797
+ // DO fix or quarantine flaky tests immediately
798
+ ```
799
+
800
+ ### ❌ DON'T: Duplicate Test Coverage
801
+
802
+ ```typescript
803
+ // DON'T test same thing at multiple levels
804
+ // Unit test: currency conversion logic
805
+ // Integration test: currency conversion in payment
806
+ // E2E test: full purchase with currency conversion
807
+
808
+ // DO test each concern at appropriate level
809
+ // Unit: Conversion logic
810
+ // Integration: Payment service uses conversion correctly
811
+ // E2E: Happy path only (one currency conversion example)
812
+ ```
813
+
814
+ ## Using with QE Agents
815
+
816
+ ### Intelligent Test Selection
817
+
818
+ **qe-regression-risk-analyzer** performs smart test selection:
819
+
820
+ ```typescript
821
+ // Analyze PR for regression risk
822
+ const analysis = await agent.analyzeRegressionRisk({
823
+ pr: 1234,
824
+ strategy: 'change-based-with-risk',
825
+ timebudget: '15min'
826
+ });
827
+
828
+ // Returns:
829
+ // {
830
+ // mustRun: ['payment.test.ts', 'checkout.integration.test.ts'],
831
+ // shouldRun: ['order.test.ts', 'inventory.test.ts'],
832
+ // canSkip: ['profile.test.ts', 'search.test.ts'],
833
+ // estimatedTime: '12 min',
834
+ // riskCoverage: 0.94
835
+ // }
836
+ ```
837
+
838
+ ### Automated Test Generation for Regression
839
+
840
+ **qe-test-generator** creates regression tests from bugs:
841
+
842
+ ```typescript
843
+ // Bug found in production
844
+ const bug = {
845
+ id: 'BUG-567',
846
+ description: 'Checkout fails when user has > 100 items in cart',
847
+ severity: 'high'
848
+ };
849
+
850
+ // Agent generates regression test
851
+ await agent.generateRegressionTest({
852
+ bug: bug,
853
+ preventRecurrence: true
854
+ });
855
+
856
+ // Creates:
857
+ // tests/regression/BUG-567-large-cart.test.ts
858
+ test('checkout succeeds with 100+ items in cart', async () => {
859
+ const cart = generateCart(150); // Edge case that failed
860
+ const result = await checkout(cart);
861
+ expect(result.status).toBe('success');
862
+ });
863
+ ```
864
+
865
+ ### Continuous Regression Monitoring
866
+
867
+ **qe-quality-analyzer** tracks regression suite health:
868
+
869
+ ```typescript
870
+ // Monitor regression suite metrics
871
+ const health = await agent.analyzeRegressionHealth({
872
+ suite: 'main-regression',
873
+ period: '30d'
874
+ });
875
+
876
+ // Returns insights:
877
+ // {
878
+ // executionTimeTrend: 'increasing', // ⚠️ Getting slower
879
+ // flakinessRate: 0.03, // ⚠️ Above 2% threshold
880
+ // coverageTrend: 'stable', // ✅ Maintaining coverage
881
+ // recommendations: [
882
+ // 'Parallelize slow tests',
883
+ // 'Fix 12 flaky tests',
884
+ // 'Remove 5 obsolete tests'
885
+ // ]
886
+ // }
887
+ ```
888
+
889
+ ### Regression Testing in CI/CD
890
+
891
+ **qe-test-executor** orchestrates regression runs:
892
+
893
+ ```typescript
894
+ // Execute smart regression in CI pipeline
895
+ await agent.executeRegression({
896
+ trigger: 'pull-request',
897
+ strategy: 'selective',
898
+ changedFiles: ['src/payment/stripe.ts', 'src/models/order.ts'],
899
+ parallel: true,
900
+ failFast: false
901
+ });
902
+
903
+ // Execution plan:
904
+ // 1. Analyze changed files
905
+ // 2. Select impacted tests (change-based)
906
+ // 3. Add critical path tests (risk-based)
907
+ // 4. Run in parallel across 4 workers
908
+ // 5. Report results with coverage metrics
909
+ ```
910
+
911
+ ### Visual Regression Testing
912
+
913
+ **qe-visual-tester** catches UI regressions:
914
+
915
+ ```typescript
916
+ // Detect visual changes after code update
917
+ await agent.visualRegression({
918
+ baseline: 'main-branch',
919
+ current: 'feature-branch',
920
+ pages: ['checkout', 'product-detail', 'cart'],
921
+ threshold: 0.01 // 1% pixel difference tolerance
922
+ });
923
+
924
+ // Returns:
925
+ // {
926
+ // changed: ['checkout-page'],
927
+ // diff: {
928
+ // 'checkout-page': {
929
+ // pixelDifference: 234,
930
+ // percentageChange: 0.023,
931
+ // screenshot: 'diff-checkout.png',
932
+ // verdict: 'review-required'
933
+ // }
934
+ // }
935
+ // }
936
+ ```
937
+
938
+ ### Fleet-Coordinated Regression
939
+
940
+ ```typescript
941
+ // Multiple agents collaborate on regression testing
942
+ const regressionFleet = await FleetManager.coordinate({
943
+ strategy: 'comprehensive-regression',
944
+ agents: [
945
+ 'qe-regression-risk-analyzer', // 1. Analyze changes, select tests
946
+ 'qe-test-generator', // 2. Generate missing regression tests
947
+ 'qe-test-executor', // 3. Execute selected tests
948
+ 'qe-coverage-analyzer', // 4. Analyze coverage gaps
949
+ 'qe-visual-tester', // 5. Check visual regressions
950
+ 'qe-quality-gate' // 6. Make GO/NO-GO decision
951
+ ],
952
+ topology: 'sequential'
953
+ });
954
+
955
+ // Execute full regression workflow
956
+ const result = await regressionFleet.execute({
957
+ pr: 1234,
958
+ release: 'v3.2.0',
959
+ riskTolerance: 'low'
960
+ });
961
+
962
+ // Returns comprehensive regression report
963
+ ```
964
+
965
+ ### Production Regression Detection
966
+
967
+ **qe-production-intelligence** detects regressions in production:
968
+
969
+ ```typescript
970
+ // Monitor production for regression signals
971
+ await agent.detectProductionRegression({
972
+ baseline: 'v3.1.0',
973
+ current: 'v3.2.0',
974
+ metrics: ['error-rate', 'latency', 'conversion'],
975
+ alertThreshold: 0.1 // 10% degradation
976
+ });
977
+
978
+ // Alerts if:
979
+ // - Error rate increases > 10%
980
+ // - Latency degrades > 10%
981
+ // - Conversion drops > 10%
982
+
983
+ // Enables fast rollback before major impact
984
+ ```
985
+
986
+ ---
987
+
988
+ ## Related Skills
989
+
990
+ **Core Quality Practices:**
991
+ - [agentic-quality-engineering](../agentic-quality-engineering/) - Agent-driven regression orchestration
992
+ - [holistic-testing-pact](../holistic-testing-pact/) - Regression across test quadrants
993
+ - [risk-based-testing](../risk-based-testing/) - Risk-based regression prioritization
994
+
995
+ **Testing Approaches:**
996
+ - [test-automation-strategy](../test-automation-strategy/) - Building automation pyramid with regression
997
+ - [api-testing-patterns](../api-testing-patterns/) - API regression testing
998
+ - [exploratory-testing-advanced](../exploratory-testing-advanced/) - Exploratory regression sessions
999
+ - [performance-testing](../performance-testing/) - Performance regression testing
1000
+ - [security-testing](../security-testing/) - Security regression scans
1001
+
1002
+ **Development Practices:**
1003
+ - [tdd-london-chicago](../tdd-london-chicago/) - Test-first creates regression safety
1004
+ - [xp-practices](../xp-practices/) - Continuous integration with regression
1005
+ - [refactoring-patterns](../refactoring-patterns/) - Safe refactoring with regression coverage
1006
+
1007
+ **Communication:**
1008
+ - [quality-metrics](../quality-metrics/) - Regression test effectiveness metrics
1009
+ - [bug-reporting-excellence](../bug-reporting-excellence/) - Regression test creation from bugs
1010
+
1011
+ ---
1012
+
1013
+ ## Remember
1014
+
1015
+ **Regression testing is insurance against change.**
1016
+
1017
+ Every code change is a risk. Regression testing mitigates that risk by:
1018
+ - Verifying existing functionality still works
1019
+ - Catching unintended side effects early
1020
+ - Building confidence for continuous deployment
1021
+ - Enabling safe refactoring and evolution
1022
+
1023
+ **Good regression testing is strategic, not exhaustive.**
1024
+
1025
+ You cannot test everything, every time. Smart regression testing:
1026
+ - Selects tests based on changes and risk
1027
+ - Runs fast enough for continuous feedback
1028
+ - Maintains reliability (no flaky tests)
1029
+ - Evolves with the product
1030
+
1031
+ **Perfect regression coverage is impossible. Effective regression testing is achievable.**
1032
+
1033
+ **With Agents**: Agents excel at intelligent test selection, impact analysis, automated test generation from bugs, and continuous regression monitoring. Use agents to make regression testing data-driven, efficient, and scalable.