agentic-qe 1.0.5 → 1.2.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.
- package/.claude/agents/qe-coverage-analyzer.md +8 -0
- package/.claude/agents/qe-flaky-test-hunter.md +9 -1
- package/.claude/agents/qe-quality-analyzer.md +405 -0
- package/.claude/agents/qe-test-generator.md +7 -0
- package/.claude/agents/reasoning/agent.md +816 -0
- package/.claude/agents/reasoning/goal-planner.md +73 -0
- package/.claude/settings.json +21 -20
- package/.claude/skills/README.md +124 -0
- package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
- package/.claude/skills/agentdb-learning/SKILL.md +545 -0
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
- package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
- package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
- package/.claude/skills/agentic-quality-engineering/SKILL.md +604 -0
- package/.claude/skills/api-testing-patterns/SKILL.md +686 -0
- package/.claude/skills/bug-reporting-excellence/SKILL.md +632 -0
- package/.claude/skills/code-review-quality/SKILL.md +683 -0
- package/.claude/skills/consultancy-practices/SKILL.md +540 -0
- package/.claude/skills/context-driven-testing/SKILL.md +466 -0
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +676 -0
- package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
- package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
- package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
- package/.claude/skills/github-code-review/SKILL.md +1140 -0
- package/.claude/skills/github-multi-repo/SKILL.md +874 -0
- package/.claude/skills/github-project-management/SKILL.md +1277 -0
- package/.claude/skills/github-release-management/SKILL.md +1081 -0
- package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
- package/.claude/skills/holistic-testing-pact/SKILL.md +225 -0
- package/.claude/skills/hooks-automation/SKILL.md +1201 -0
- package/.claude/skills/pair-programming/SKILL.md +1202 -0
- package/.claude/skills/performance-analysis/SKILL.md +563 -0
- package/.claude/skills/performance-testing/SKILL.md +662 -0
- package/.claude/skills/quality-metrics/SKILL.md +592 -0
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
- package/.claude/skills/refactoring-patterns/SKILL.md +778 -0
- package/.claude/skills/risk-based-testing/SKILL.md +721 -0
- package/.claude/skills/security-testing/SKILL.md +651 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
- package/.claude/skills/stream-chain/SKILL.md +563 -0
- package/.claude/skills/swarm-advanced/SKILL.md +973 -0
- package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
- package/.claude/skills/tdd-london-chicago/SKILL.md +567 -0
- package/.claude/skills/technical-writing/SKILL.md +235 -0
- package/.claude/skills/test-automation-strategy/SKILL.md +842 -0
- package/.claude/skills/verification-quality/SKILL.md +649 -0
- package/.claude/skills/xp-practices/SKILL.md +671 -0
- package/.claude/statusline-command.sh +176 -0
- package/CHANGELOG.md +645 -1
- package/CONTRIBUTING.md +51 -0
- package/README.md +758 -162
- package/bin/aqe +90 -938
- package/config/improvement-loop.config.ts +323 -0
- package/config/neural-agent.config.ts +197 -0
- package/dist/adapters/MemoryStoreAdapter.d.ts +16 -16
- package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
- package/dist/adapters/MemoryStoreAdapter.js +22 -16
- package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
- package/dist/agents/BaseAgent.d.ts +69 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +382 -1
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts +69 -3
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.js +418 -51
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.js +13 -13
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.d.ts +76 -4
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.js +375 -13
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
- package/dist/agents/FleetCommanderAgent.js +2 -2
- package/dist/agents/FleetCommanderAgent.js.map +1 -1
- package/dist/agents/LearningAgent.d.ts +84 -0
- package/dist/agents/LearningAgent.d.ts.map +1 -0
- package/dist/agents/LearningAgent.js +197 -0
- package/dist/agents/LearningAgent.js.map +1 -0
- package/dist/agents/NeuralAgentExtension.d.ts +117 -0
- package/dist/agents/NeuralAgentExtension.d.ts.map +1 -0
- package/dist/agents/NeuralAgentExtension.js +288 -0
- package/dist/agents/NeuralAgentExtension.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
- package/dist/agents/PerformanceTesterAgent.js +4 -3
- package/dist/agents/PerformanceTesterAgent.js.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.js +7 -7
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.js +2 -2
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
- package/dist/agents/QualityGateAgent.js +5 -5
- package/dist/agents/QualityGateAgent.js.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.js +7 -7
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.js +1 -1
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
- package/dist/agents/SecurityScannerAgent.js +6 -6
- package/dist/agents/SecurityScannerAgent.js.map +1 -1
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
- package/dist/agents/TestExecutorAgent.js +1 -3
- package/dist/agents/TestExecutorAgent.js.map +1 -1
- package/dist/agents/TestGeneratorAgent.d.ts +53 -2
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
- package/dist/agents/TestGeneratorAgent.js +372 -31
- package/dist/agents/TestGeneratorAgent.js.map +1 -1
- package/dist/agents/mixins/NeuralCapableMixin.d.ts +130 -0
- package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/NeuralCapableMixin.js +358 -0
- package/dist/agents/mixins/NeuralCapableMixin.js.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts +34 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.js +346 -0
- package/dist/agents/mixins/QUICCapableMixin.js.map +1 -0
- package/dist/cli/commands/agent/index.d.ts +5 -0
- package/dist/cli/commands/agent/index.d.ts.map +1 -1
- package/dist/cli/commands/agent/index.js +11 -6
- package/dist/cli/commands/agent/index.js.map +1 -1
- package/dist/cli/commands/agent/kill.d.ts +13 -0
- package/dist/cli/commands/agent/kill.d.ts.map +1 -0
- package/dist/cli/commands/agent/kill.js +65 -0
- package/dist/cli/commands/agent/kill.js.map +1 -0
- package/dist/cli/commands/agent/list.d.ts +19 -0
- package/dist/cli/commands/agent/list.d.ts.map +1 -0
- package/dist/cli/commands/agent/list.js +92 -0
- package/dist/cli/commands/agent/list.js.map +1 -0
- package/dist/cli/commands/agent/logs.d.ts +14 -0
- package/dist/cli/commands/agent/logs.d.ts.map +1 -0
- package/dist/cli/commands/agent/logs.js +77 -0
- package/dist/cli/commands/agent/logs.js.map +1 -0
- package/dist/cli/commands/agent/metrics.d.ts +21 -0
- package/dist/cli/commands/agent/metrics.d.ts.map +1 -0
- package/dist/cli/commands/agent/metrics.js +87 -0
- package/dist/cli/commands/agent/metrics.js.map +1 -0
- package/dist/cli/commands/agent/spawn.d.ts +28 -0
- package/dist/cli/commands/agent/spawn.d.ts.map +1 -0
- package/dist/cli/commands/agent/spawn.js +83 -0
- package/dist/cli/commands/agent/spawn.js.map +1 -0
- package/dist/cli/commands/improve/index.d.ts +70 -0
- package/dist/cli/commands/improve/index.d.ts.map +1 -0
- package/dist/cli/commands/improve/index.js +530 -0
- package/dist/cli/commands/improve/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +57 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +1127 -42
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learn/index.d.ts +68 -0
- package/dist/cli/commands/learn/index.d.ts.map +1 -0
- package/dist/cli/commands/learn/index.js +431 -0
- package/dist/cli/commands/learn/index.js.map +1 -0
- package/dist/cli/commands/patterns/index.d.ts +75 -0
- package/dist/cli/commands/patterns/index.d.ts.map +1 -0
- package/dist/cli/commands/patterns/index.js +502 -0
- package/dist/cli/commands/patterns/index.js.map +1 -0
- package/dist/cli/commands/skills/index.d.ts +51 -0
- package/dist/cli/commands/skills/index.d.ts.map +1 -0
- package/dist/cli/commands/skills/index.js +364 -0
- package/dist/cli/commands/skills/index.js.map +1 -0
- package/dist/cli/index.js +458 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/core/EventBus.d.ts +38 -0
- package/dist/core/EventBus.d.ts.map +1 -1
- package/dist/core/EventBus.js +176 -31
- package/dist/core/EventBus.js.map +1 -1
- package/dist/core/FleetManager.d.ts +35 -1
- package/dist/core/FleetManager.d.ts.map +1 -1
- package/dist/core/FleetManager.js +121 -45
- package/dist/core/FleetManager.js.map +1 -1
- package/dist/core/MemoryManager.d.ts +19 -1
- package/dist/core/MemoryManager.d.ts.map +1 -1
- package/dist/core/MemoryManager.js +25 -1
- package/dist/core/MemoryManager.js.map +1 -1
- package/dist/core/embeddings/EmbeddingCache.d.ts +134 -0
- package/dist/core/embeddings/EmbeddingCache.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingCache.js +239 -0
- package/dist/core/embeddings/EmbeddingCache.js.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts +224 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.js +459 -0
- package/dist/core/embeddings/EmbeddingGenerator.js.map +1 -0
- package/dist/core/embeddings/index.d.ts +15 -0
- package/dist/core/embeddings/index.d.ts.map +1 -0
- package/dist/core/embeddings/index.js +22 -0
- package/dist/core/embeddings/index.js.map +1 -0
- package/dist/core/memory/AgentDBIntegration.d.ts +35 -0
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -0
- package/dist/core/memory/AgentDBIntegration.js +75 -0
- package/dist/core/memory/AgentDBIntegration.js.map +1 -0
- package/dist/core/memory/AgentDBManager.d.ts +200 -0
- package/dist/core/memory/AgentDBManager.d.ts.map +1 -0
- package/dist/core/memory/AgentDBManager.js +263 -0
- package/dist/core/memory/AgentDBManager.js.map +1 -0
- package/dist/core/memory/AgentDBService.d.ts +160 -0
- package/dist/core/memory/AgentDBService.d.ts.map +1 -0
- package/dist/core/memory/AgentDBService.js +450 -0
- package/dist/core/memory/AgentDBService.js.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts +51 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.js +230 -0
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts +58 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.js +80 -0
- package/dist/core/memory/ReasoningBankAdapter.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +79 -2
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +243 -52
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/index.d.ts +4 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +9 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/neural/NeuralTrainer.d.ts +137 -0
- package/dist/core/neural/NeuralTrainer.d.ts.map +1 -0
- package/dist/core/neural/NeuralTrainer.js +543 -0
- package/dist/core/neural/NeuralTrainer.js.map +1 -0
- package/dist/core/neural/index.d.ts +8 -0
- package/dist/core/neural/index.d.ts.map +1 -0
- package/dist/core/neural/index.js +24 -0
- package/dist/core/neural/index.js.map +1 -0
- package/dist/core/neural/types.d.ts +216 -0
- package/dist/core/neural/types.d.ts.map +1 -0
- package/dist/core/neural/types.js +8 -0
- package/dist/core/neural/types.js.map +1 -0
- package/dist/core/security/CertificateValidator.d.ts +130 -0
- package/dist/core/security/CertificateValidator.d.ts.map +1 -0
- package/dist/core/security/CertificateValidator.js +376 -0
- package/dist/core/security/CertificateValidator.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +62 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +381 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/SecureQUICTransport.d.ts +71 -0
- package/dist/core/transport/SecureQUICTransport.d.ts.map +1 -0
- package/dist/core/transport/SecureQUICTransport.js +253 -0
- package/dist/core/transport/SecureQUICTransport.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/learning/AdvancedFeatureExtractor.d.ts +123 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.js +423 -0
- package/dist/learning/AdvancedFeatureExtractor.js.map +1 -0
- package/dist/learning/FlakyFixRecommendations.d.ts +40 -0
- package/dist/learning/FlakyFixRecommendations.d.ts.map +1 -0
- package/dist/learning/FlakyFixRecommendations.js +247 -0
- package/dist/learning/FlakyFixRecommendations.js.map +1 -0
- package/dist/learning/FlakyPredictionModel.d.ts +67 -0
- package/dist/learning/FlakyPredictionModel.d.ts.map +1 -0
- package/dist/learning/FlakyPredictionModel.js +336 -0
- package/dist/learning/FlakyPredictionModel.js.map +1 -0
- package/dist/learning/FlakyTestDetector.d.ts +55 -0
- package/dist/learning/FlakyTestDetector.d.ts.map +1 -0
- package/dist/learning/FlakyTestDetector.js +237 -0
- package/dist/learning/FlakyTestDetector.js.map +1 -0
- package/dist/learning/ImprovementLoop.d.ts +133 -0
- package/dist/learning/ImprovementLoop.d.ts.map +1 -0
- package/dist/learning/ImprovementLoop.js +412 -0
- package/dist/learning/ImprovementLoop.js.map +1 -0
- package/dist/learning/ImprovementWorker.d.ts +83 -0
- package/dist/learning/ImprovementWorker.d.ts.map +1 -0
- package/dist/learning/ImprovementWorker.js +164 -0
- package/dist/learning/ImprovementWorker.js.map +1 -0
- package/dist/learning/LearningEngine.d.ts +144 -0
- package/dist/learning/LearningEngine.d.ts.map +1 -0
- package/dist/learning/LearningEngine.js +531 -0
- package/dist/learning/LearningEngine.js.map +1 -0
- package/dist/learning/NeuralPatternMatcher.d.ts +184 -0
- package/dist/learning/NeuralPatternMatcher.d.ts.map +1 -0
- package/dist/learning/NeuralPatternMatcher.js +702 -0
- package/dist/learning/NeuralPatternMatcher.js.map +1 -0
- package/dist/learning/NeuralTrainer.d.ts +209 -0
- package/dist/learning/NeuralTrainer.d.ts.map +1 -0
- package/dist/learning/NeuralTrainer.js +478 -0
- package/dist/learning/NeuralTrainer.js.map +1 -0
- package/dist/learning/PerformanceTracker.d.ts +118 -0
- package/dist/learning/PerformanceTracker.d.ts.map +1 -0
- package/dist/learning/PerformanceTracker.js +376 -0
- package/dist/learning/PerformanceTracker.js.map +1 -0
- package/dist/learning/StatisticalAnalysis.d.ts +47 -0
- package/dist/learning/StatisticalAnalysis.d.ts.map +1 -0
- package/dist/learning/StatisticalAnalysis.js +170 -0
- package/dist/learning/StatisticalAnalysis.js.map +1 -0
- package/dist/learning/SwarmIntegration.d.ts +107 -0
- package/dist/learning/SwarmIntegration.d.ts.map +1 -0
- package/dist/learning/SwarmIntegration.js +191 -0
- package/dist/learning/SwarmIntegration.js.map +1 -0
- package/dist/learning/index.d.ts +16 -0
- package/dist/learning/index.d.ts.map +1 -0
- package/dist/learning/index.js +32 -0
- package/dist/learning/index.js.map +1 -0
- package/dist/learning/types.d.ts +289 -0
- package/dist/learning/types.d.ts.map +1 -0
- package/dist/learning/types.js +25 -0
- package/dist/learning/types.js.map +1 -0
- package/dist/mcp/MCPToolRegistry.d.ts +34 -0
- package/dist/mcp/MCPToolRegistry.d.ts.map +1 -0
- package/dist/mcp/MCPToolRegistry.js +48 -0
- package/dist/mcp/MCPToolRegistry.js.map +1 -0
- package/dist/mcp/handlers/phase2/Phase2Tools.d.ts +175 -0
- package/dist/mcp/handlers/phase2/Phase2Tools.d.ts.map +1 -0
- package/dist/mcp/handlers/phase2/Phase2Tools.js +693 -0
- package/dist/mcp/handlers/phase2/Phase2Tools.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -4
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +94 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +7 -1
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/tools.d.ts +15 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +17 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/reasoning/CodeSignatureGenerator.d.ts +98 -0
- package/dist/reasoning/CodeSignatureGenerator.d.ts.map +1 -0
- package/dist/reasoning/CodeSignatureGenerator.js +427 -0
- package/dist/reasoning/CodeSignatureGenerator.js.map +1 -0
- package/dist/reasoning/PatternClassifier.d.ts +98 -0
- package/dist/reasoning/PatternClassifier.d.ts.map +1 -0
- package/dist/reasoning/PatternClassifier.js +345 -0
- package/dist/reasoning/PatternClassifier.js.map +1 -0
- package/dist/reasoning/PatternExtractor.d.ts +131 -0
- package/dist/reasoning/PatternExtractor.d.ts.map +1 -0
- package/dist/reasoning/PatternExtractor.js +539 -0
- package/dist/reasoning/PatternExtractor.js.map +1 -0
- package/dist/reasoning/PatternMemoryIntegration.d.ts +102 -0
- package/dist/reasoning/PatternMemoryIntegration.d.ts.map +1 -0
- package/dist/reasoning/PatternMemoryIntegration.js +336 -0
- package/dist/reasoning/PatternMemoryIntegration.js.map +1 -0
- package/dist/reasoning/QEReasoningBank.d.ts +121 -0
- package/dist/reasoning/QEReasoningBank.d.ts.map +1 -0
- package/dist/reasoning/QEReasoningBank.js +235 -0
- package/dist/reasoning/QEReasoningBank.js.map +1 -0
- package/dist/reasoning/TestTemplateCreator.d.ts +95 -0
- package/dist/reasoning/TestTemplateCreator.d.ts.map +1 -0
- package/dist/reasoning/TestTemplateCreator.js +535 -0
- package/dist/reasoning/TestTemplateCreator.js.map +1 -0
- package/dist/reasoning/index.d.ts +10 -0
- package/dist/reasoning/index.d.ts.map +1 -0
- package/dist/reasoning/index.js +31 -0
- package/dist/reasoning/index.js.map +1 -0
- package/dist/reasoning/types.d.ts +717 -0
- package/dist/reasoning/types.d.ts.map +1 -0
- package/dist/reasoning/types.js +57 -0
- package/dist/reasoning/types.js.map +1 -0
- package/dist/transport/QUICTransport.d.ts +340 -0
- package/dist/transport/QUICTransport.d.ts.map +1 -0
- package/dist/transport/QUICTransport.js +814 -0
- package/dist/transport/QUICTransport.js.map +1 -0
- package/dist/transport/UDPTransport.d.ts +348 -0
- package/dist/transport/UDPTransport.d.ts.map +1 -0
- package/dist/transport/UDPTransport.js +820 -0
- package/dist/transport/UDPTransport.js.map +1 -0
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/index.d.ts +41 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/pattern.types.d.ts +364 -0
- package/dist/types/pattern.types.d.ts.map +1 -0
- package/dist/types/pattern.types.js +60 -0
- package/dist/types/pattern.types.js.map +1 -0
- package/dist/types/quic.d.ts +339 -0
- package/dist/types/quic.d.ts.map +1 -0
- package/dist/types/quic.js +48 -0
- package/dist/types/quic.js.map +1 -0
- package/dist/utils/Config.js +1 -1
- package/dist/utils/Config.js.map +1 -1
- package/dist/utils/Database.d.ts +14 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +51 -4
- package/dist/utils/Database.js.map +1 -1
- package/dist/utils/Logger.d.ts.map +1 -1
- package/dist/utils/Logger.js +111 -26
- package/dist/utils/Logger.js.map +1 -1
- package/package.json +54 -9
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-automation-strategy
|
|
3
|
+
description: Build effective test automation strategy using the test pyramid and practical patterns. Use when planning automation approach, selecting tools, or optimizing test suites.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: testing
|
|
6
|
+
tags: [test-automation, test-pyramid, ci-cd, automation-strategy, unit-testing, integration-testing]
|
|
7
|
+
difficulty: intermediate
|
|
8
|
+
estimated_time: 3-4 hours
|
|
9
|
+
author: user
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Test Automation Strategy
|
|
13
|
+
|
|
14
|
+
## Core Philosophy
|
|
15
|
+
|
|
16
|
+
**Automate to enable humans to do what humans do best: think, explore, and judge.**
|
|
17
|
+
|
|
18
|
+
Automation is not the goal. Automation is a tool to get faster feedback and free humans for skilled testing work.
|
|
19
|
+
|
|
20
|
+
## When to Automate
|
|
21
|
+
|
|
22
|
+
### Automation Makes Sense When
|
|
23
|
+
|
|
24
|
+
**Repetitive and Stable**
|
|
25
|
+
- Same test executed frequently
|
|
26
|
+
- Test steps won't change much
|
|
27
|
+
- Cost of automation < cost of manual execution over time
|
|
28
|
+
|
|
29
|
+
**Fast Feedback Needed**
|
|
30
|
+
- Tests in CI pipeline
|
|
31
|
+
- Regression safety net
|
|
32
|
+
- Sanity checks before deployment
|
|
33
|
+
|
|
34
|
+
**Difficult to Test Manually**
|
|
35
|
+
- Performance testing (1000 concurrent users)
|
|
36
|
+
- Load testing over hours/days
|
|
37
|
+
- Cross-browser testing (20 browsers)
|
|
38
|
+
- API testing (hundreds of endpoints)
|
|
39
|
+
|
|
40
|
+
**Precise Verification Required**
|
|
41
|
+
- Complex calculations
|
|
42
|
+
- Data integrity checks
|
|
43
|
+
- Exact timing requirements
|
|
44
|
+
|
|
45
|
+
### Automation Doesn't Make Sense When
|
|
46
|
+
|
|
47
|
+
**Rapidly Changing**
|
|
48
|
+
- Feature in active development
|
|
49
|
+
- Requirements unclear
|
|
50
|
+
- UI redesign in progress
|
|
51
|
+
- Cost of maintenance > value
|
|
52
|
+
|
|
53
|
+
**Complex Setup**
|
|
54
|
+
- Requires extensive test data
|
|
55
|
+
- Multiple systems/dependencies
|
|
56
|
+
- Environment fragile
|
|
57
|
+
- Setup time >> execution time
|
|
58
|
+
|
|
59
|
+
**Requires Human Judgment**
|
|
60
|
+
- Usability testing
|
|
61
|
+
- Visual design validation
|
|
62
|
+
- Exploratory testing
|
|
63
|
+
- Accessibility evaluation (partly automatable)
|
|
64
|
+
|
|
65
|
+
**One-Time or Rare**
|
|
66
|
+
- Ad-hoc investigation
|
|
67
|
+
- Production debugging
|
|
68
|
+
- One-time migration
|
|
69
|
+
- Annual report generation
|
|
70
|
+
|
|
71
|
+
**Low Risk, Low Value**
|
|
72
|
+
- Admin feature used monthly
|
|
73
|
+
- Edge case that never occurs
|
|
74
|
+
- Deprecated feature
|
|
75
|
+
|
|
76
|
+
## The Test Automation Pyramid
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
/\
|
|
80
|
+
/ \ E2E/UI Tests
|
|
81
|
+
/ \ (Few)
|
|
82
|
+
/------\
|
|
83
|
+
/ \ Integration Tests
|
|
84
|
+
/ \ (Some)
|
|
85
|
+
/------------\
|
|
86
|
+
/ \ Unit Tests
|
|
87
|
+
/________________\ (Many)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Unit Tests (70% of automated tests)
|
|
91
|
+
|
|
92
|
+
**What:** Test individual functions/methods in isolation
|
|
93
|
+
|
|
94
|
+
**Benefits:**
|
|
95
|
+
- Fast (milliseconds)
|
|
96
|
+
- Reliable
|
|
97
|
+
- Pinpoint failures
|
|
98
|
+
- Enable fearless refactoring
|
|
99
|
+
|
|
100
|
+
**Tools:** Jest, JUnit, pytest, RSpec
|
|
101
|
+
|
|
102
|
+
**Example:**
|
|
103
|
+
```javascript
|
|
104
|
+
test('calculateTax returns correct amount', () => {
|
|
105
|
+
expect(calculateTax(100, 0.10)).toBe(10);
|
|
106
|
+
expect(calculateTax(0, 0.10)).toBe(0);
|
|
107
|
+
expect(calculateTax(100, 0)).toBe(0);
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Integration Tests (20% of automated tests)
|
|
112
|
+
|
|
113
|
+
**What:** Test multiple components working together
|
|
114
|
+
|
|
115
|
+
**Examples:**
|
|
116
|
+
- API endpoint + database
|
|
117
|
+
- Service layer + external API
|
|
118
|
+
- Module A + Module B interaction
|
|
119
|
+
|
|
120
|
+
**Benefits:**
|
|
121
|
+
- Test realistic interactions
|
|
122
|
+
- Catch integration issues
|
|
123
|
+
- Still relatively fast
|
|
124
|
+
|
|
125
|
+
**Tools:** Supertest, RestAssured, Testcontainers
|
|
126
|
+
|
|
127
|
+
**Example:**
|
|
128
|
+
```javascript
|
|
129
|
+
test('POST /orders creates order in database', async () => {
|
|
130
|
+
const response = await request(app)
|
|
131
|
+
.post('/orders')
|
|
132
|
+
.send({ userId: 123, items: [...] });
|
|
133
|
+
|
|
134
|
+
expect(response.status).toBe(201);
|
|
135
|
+
|
|
136
|
+
const order = await db.orders.findOne({ id: response.body.id });
|
|
137
|
+
expect(order.userId).toBe(123);
|
|
138
|
+
});
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### E2E/UI Tests (10% of automated tests)
|
|
142
|
+
|
|
143
|
+
**What:** Test complete user workflows through the UI
|
|
144
|
+
|
|
145
|
+
**Benefits:**
|
|
146
|
+
- Test real user experience
|
|
147
|
+
- Catch UI/UX issues
|
|
148
|
+
- Verify complete flows
|
|
149
|
+
|
|
150
|
+
**Costs:**
|
|
151
|
+
- Slow (seconds to minutes)
|
|
152
|
+
- Flaky (timing, network, rendering)
|
|
153
|
+
- Expensive to maintain
|
|
154
|
+
- Hard to debug
|
|
155
|
+
|
|
156
|
+
**Tools:** Playwright, Cypress, Selenium
|
|
157
|
+
|
|
158
|
+
**Example:**
|
|
159
|
+
```javascript
|
|
160
|
+
test('user can complete checkout', async () => {
|
|
161
|
+
await page.goto('/products');
|
|
162
|
+
await page.click('[data-testid="add-to-cart"]');
|
|
163
|
+
await page.click('[data-testid="checkout"]');
|
|
164
|
+
await page.fill('[name="cardNumber"]', '4242424242424242');
|
|
165
|
+
await page.click('[data-testid="place-order"]');
|
|
166
|
+
|
|
167
|
+
await expect(page.locator('.success-message')).toBeVisible();
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Keep E2E tests to critical happy paths only.**
|
|
172
|
+
|
|
173
|
+
## Anti-Patterns to Avoid
|
|
174
|
+
|
|
175
|
+
### 🚫 Ice Cream Cone (Inverted Pyramid)
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
/________________\ E2E Tests (Many) ❌
|
|
179
|
+
\ / Integration Tests (Some)
|
|
180
|
+
\ / Unit Tests (Few)
|
|
181
|
+
\ /
|
|
182
|
+
\________/
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Problem:** Slow, flaky, expensive test suite
|
|
186
|
+
**Fix:** Write more unit tests, fewer E2E tests
|
|
187
|
+
|
|
188
|
+
### 🚫 Test All the Things
|
|
189
|
+
|
|
190
|
+
**Problem:** Automating everything because "automation is good"
|
|
191
|
+
|
|
192
|
+
**Reality:**
|
|
193
|
+
- Some tests cost more than they provide value
|
|
194
|
+
- Maintenance burden grows unsustainably
|
|
195
|
+
- Team drowns in test maintenance
|
|
196
|
+
|
|
197
|
+
**Fix:** Automate strategically based on value
|
|
198
|
+
|
|
199
|
+
### 🚫 Testing Through UI Only
|
|
200
|
+
|
|
201
|
+
**Problem:** All tests go through browser UI
|
|
202
|
+
|
|
203
|
+
**Issues:**
|
|
204
|
+
- Slow execution
|
|
205
|
+
- Flaky tests
|
|
206
|
+
- Hard to test edge cases
|
|
207
|
+
- Expensive maintenance
|
|
208
|
+
|
|
209
|
+
**Fix:** Test at appropriate level
|
|
210
|
+
- Business logic → unit tests
|
|
211
|
+
- API contracts → integration tests
|
|
212
|
+
- Critical flows → E2E tests
|
|
213
|
+
|
|
214
|
+
### 🚫 Record and Playback
|
|
215
|
+
|
|
216
|
+
**Problem:** Using record/playback tools without understanding
|
|
217
|
+
|
|
218
|
+
**Issues:**
|
|
219
|
+
- Fragile tests (break on minor UI changes)
|
|
220
|
+
- Unmaintainable
|
|
221
|
+
- No code review possible
|
|
222
|
+
- Vendor lock-in
|
|
223
|
+
|
|
224
|
+
**Fix:** Write code-based tests with good selectors
|
|
225
|
+
|
|
226
|
+
### 🚫 No Test Data Strategy
|
|
227
|
+
|
|
228
|
+
**Problem:** Tests depend on specific database state
|
|
229
|
+
|
|
230
|
+
**Issues:**
|
|
231
|
+
- Tests fail randomly
|
|
232
|
+
- Can't run tests in parallel
|
|
233
|
+
- Hard to reproduce failures
|
|
234
|
+
- Environment-dependent
|
|
235
|
+
|
|
236
|
+
**Fix:**
|
|
237
|
+
- Generate test data per test
|
|
238
|
+
- Use database transactions
|
|
239
|
+
- Isolate test data
|
|
240
|
+
- Clean up after tests
|
|
241
|
+
|
|
242
|
+
### 🚫 Sleep-Based Waits
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
// BAD
|
|
246
|
+
await page.click('button');
|
|
247
|
+
await sleep(5000); // Hope 5 seconds is enough
|
|
248
|
+
await page.click('next-button');
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Problem:** Slow (always waits full time) and flaky (sometimes not enough)
|
|
252
|
+
|
|
253
|
+
**Fix:** Use explicit waits
|
|
254
|
+
```javascript
|
|
255
|
+
// GOOD
|
|
256
|
+
await page.click('button');
|
|
257
|
+
await page.waitForSelector('next-button', { state: 'visible' });
|
|
258
|
+
await page.click('next-button');
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### 🚫 God Tests
|
|
262
|
+
|
|
263
|
+
**Problem:** One test that tests everything (1000+ lines)
|
|
264
|
+
|
|
265
|
+
**Issues:**
|
|
266
|
+
- Hard to understand
|
|
267
|
+
- Hard to debug when fails
|
|
268
|
+
- Slow
|
|
269
|
+
- Change in any feature breaks test
|
|
270
|
+
|
|
271
|
+
**Fix:** Small, focused tests - one concept per test
|
|
272
|
+
|
|
273
|
+
## Building Maintainable Tests
|
|
274
|
+
|
|
275
|
+
### Good Test Characteristics (F.I.R.S.T.)
|
|
276
|
+
|
|
277
|
+
**Fast**
|
|
278
|
+
- Unit tests < 100ms
|
|
279
|
+
- Integration tests < 1s
|
|
280
|
+
- E2E tests < 30s
|
|
281
|
+
- Total suite < 10 minutes
|
|
282
|
+
|
|
283
|
+
**Independent**
|
|
284
|
+
- Tests don't depend on each other
|
|
285
|
+
- Can run in any order
|
|
286
|
+
- Can run in parallel
|
|
287
|
+
|
|
288
|
+
**Repeatable**
|
|
289
|
+
- Same result every time
|
|
290
|
+
- No flaky tests
|
|
291
|
+
- Works in any environment
|
|
292
|
+
|
|
293
|
+
**Self-Validating**
|
|
294
|
+
- Clear pass/fail
|
|
295
|
+
- No manual verification
|
|
296
|
+
- Assertions meaningful
|
|
297
|
+
|
|
298
|
+
**Timely**
|
|
299
|
+
- Written with code (TDD)
|
|
300
|
+
- Run frequently
|
|
301
|
+
- Fast feedback
|
|
302
|
+
|
|
303
|
+
### Page Object Model (for UI tests)
|
|
304
|
+
|
|
305
|
+
**Bad: Direct selectors everywhere**
|
|
306
|
+
```javascript
|
|
307
|
+
test('login', async () => {
|
|
308
|
+
await page.fill('#username', 'user@test.com');
|
|
309
|
+
await page.fill('#password', 'pass123');
|
|
310
|
+
await page.click('button[type="submit"]');
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
test('profile', async () => {
|
|
314
|
+
await page.fill('#username', 'user@test.com'); // Duplicated
|
|
315
|
+
await page.fill('#password', 'pass123');
|
|
316
|
+
await page.click('button[type="submit"]');
|
|
317
|
+
await page.click('a[href="/profile"]');
|
|
318
|
+
});
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
**Good: Page Object Model**
|
|
322
|
+
```javascript
|
|
323
|
+
class LoginPage {
|
|
324
|
+
constructor(page) {
|
|
325
|
+
this.page = page;
|
|
326
|
+
this.usernameInput = '#username';
|
|
327
|
+
this.passwordInput = '#password';
|
|
328
|
+
this.submitButton = 'button[type="submit"]';
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
async login(username, password) {
|
|
332
|
+
await this.page.fill(this.usernameInput, username);
|
|
333
|
+
await this.page.fill(this.passwordInput, password);
|
|
334
|
+
await this.page.click(this.submitButton);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
test('login', async () => {
|
|
339
|
+
const loginPage = new LoginPage(page);
|
|
340
|
+
await loginPage.login('user@test.com', 'pass123');
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
test('profile', async () => {
|
|
344
|
+
const loginPage = new LoginPage(page);
|
|
345
|
+
await loginPage.login('user@test.com', 'pass123'); // Reusable
|
|
346
|
+
await page.click('a[href="/profile"]');
|
|
347
|
+
});
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Benefits:**
|
|
351
|
+
- Change selector once, fixes all tests
|
|
352
|
+
- Reusable code
|
|
353
|
+
- More readable tests
|
|
354
|
+
- Easier maintenance
|
|
355
|
+
|
|
356
|
+
### Good Selectors
|
|
357
|
+
|
|
358
|
+
**Priority order:**
|
|
359
|
+
1. **data-testid** (best for testing)
|
|
360
|
+
```html
|
|
361
|
+
<button data-testid="checkout-btn">Checkout</button>
|
|
362
|
+
```
|
|
363
|
+
```javascript
|
|
364
|
+
await page.click('[data-testid="checkout-btn"]');
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
2. **Semantic HTML** (accessible)
|
|
368
|
+
```javascript
|
|
369
|
+
await page.click('button[aria-label="Submit form"]');
|
|
370
|
+
await page.getByRole('button', { name: 'Submit' });
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
3. **Stable attributes** (id, name)
|
|
374
|
+
```javascript
|
|
375
|
+
await page.click('#submit-button');
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
4. **Avoid:** CSS classes (styling changes break tests), XPath (fragile)
|
|
379
|
+
|
|
380
|
+
### Test Data Management
|
|
381
|
+
|
|
382
|
+
**Pattern 1: Test Data Builders**
|
|
383
|
+
```javascript
|
|
384
|
+
class OrderBuilder {
|
|
385
|
+
constructor() {
|
|
386
|
+
this.order = {
|
|
387
|
+
userId: 123,
|
|
388
|
+
items: [],
|
|
389
|
+
status: 'pending'
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
withItems(items) {
|
|
394
|
+
this.order.items = items;
|
|
395
|
+
return this;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
withStatus(status) {
|
|
399
|
+
this.order.status = status;
|
|
400
|
+
return this;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
build() {
|
|
404
|
+
return this.order;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Usage
|
|
409
|
+
const order = new OrderBuilder()
|
|
410
|
+
.withItems([{id: 1, qty: 2}])
|
|
411
|
+
.withStatus('completed')
|
|
412
|
+
.build();
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**Pattern 2: Fixtures/Factories**
|
|
416
|
+
```javascript
|
|
417
|
+
// fixtures.js
|
|
418
|
+
export const validUser = {
|
|
419
|
+
email: 'test@example.com',
|
|
420
|
+
password: 'ValidPass123!',
|
|
421
|
+
role: 'customer'
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export const adminUser = {
|
|
425
|
+
...validUser,
|
|
426
|
+
role: 'admin'
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
// test
|
|
430
|
+
import { validUser } from './fixtures';
|
|
431
|
+
await createUser(validUser);
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**Pattern 3: Database Seeding**
|
|
435
|
+
```javascript
|
|
436
|
+
beforeEach(async () => {
|
|
437
|
+
await db.seed([
|
|
438
|
+
{ table: 'users', data: testUsers },
|
|
439
|
+
{ table: 'orders', data: testOrders }
|
|
440
|
+
]);
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
afterEach(async () => {
|
|
444
|
+
await db.clean(); // Reset to clean state
|
|
445
|
+
});
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
## CI/CD Integration
|
|
449
|
+
|
|
450
|
+
### Pipeline Structure
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
Commit → Fast Tests → Slower Tests → Deploy
|
|
454
|
+
(< 5 min) (< 15 min)
|
|
455
|
+
|
|
456
|
+
Fast Tests:
|
|
457
|
+
- Unit tests
|
|
458
|
+
- Linting
|
|
459
|
+
- Type checking
|
|
460
|
+
|
|
461
|
+
Slower Tests:
|
|
462
|
+
- Integration tests
|
|
463
|
+
- E2E critical paths
|
|
464
|
+
- Security scans
|
|
465
|
+
|
|
466
|
+
Deploy:
|
|
467
|
+
- Staging (auto)
|
|
468
|
+
- Production (manual or auto with feature flags)
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
### Parallel Execution
|
|
472
|
+
|
|
473
|
+
**Benefits:**
|
|
474
|
+
- Faster feedback
|
|
475
|
+
- Better resource utilization
|
|
476
|
+
|
|
477
|
+
**Strategies:**
|
|
478
|
+
```javascript
|
|
479
|
+
// Run test files in parallel
|
|
480
|
+
// jest.config.js
|
|
481
|
+
module.exports = {
|
|
482
|
+
maxWorkers: 4, // 4 parallel workers
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
// Playwright
|
|
486
|
+
npx playwright test --workers=4
|
|
487
|
+
|
|
488
|
+
// Split by test file
|
|
489
|
+
CI Matrix:
|
|
490
|
+
- Worker 1: Unit tests (auth)
|
|
491
|
+
- Worker 2: Unit tests (orders)
|
|
492
|
+
- Worker 3: Integration tests
|
|
493
|
+
- Worker 4: E2E tests
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Flaky Test Management
|
|
497
|
+
|
|
498
|
+
**When test fails:**
|
|
499
|
+
1. Does it fail consistently? → Real bug
|
|
500
|
+
2. Fails sometimes? → Flaky test
|
|
501
|
+
|
|
502
|
+
**Handling flaky tests:**
|
|
503
|
+
```javascript
|
|
504
|
+
// WRONG: Retry until passes
|
|
505
|
+
test.retry(5); // Hiding the problem
|
|
506
|
+
|
|
507
|
+
// RIGHT: Fix the flakiness
|
|
508
|
+
// - Add proper waits
|
|
509
|
+
// - Fix race conditions
|
|
510
|
+
// - Isolate test data
|
|
511
|
+
// - Improve selectors
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
**Short-term mitigation:**
|
|
515
|
+
```javascript
|
|
516
|
+
// Quarantine flaky tests
|
|
517
|
+
test.skip('flaky test', () => {
|
|
518
|
+
// TODO: Fix flakiness (TICKET-123)
|
|
519
|
+
});
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
## Measuring Automation Success
|
|
523
|
+
|
|
524
|
+
### Metrics That Matter
|
|
525
|
+
|
|
526
|
+
**Coverage (with context):**
|
|
527
|
+
- Not just % code coverage
|
|
528
|
+
- Risk coverage (high-risk areas tested?)
|
|
529
|
+
- Feature coverage (user flows tested?)
|
|
530
|
+
|
|
531
|
+
**Feedback Speed:**
|
|
532
|
+
- Time to run full suite
|
|
533
|
+
- Time to first failure
|
|
534
|
+
- Time from commit to deploy
|
|
535
|
+
|
|
536
|
+
**Reliability:**
|
|
537
|
+
- Flaky test rate (<2% acceptable)
|
|
538
|
+
- False positive rate
|
|
539
|
+
- Test maintenance time
|
|
540
|
+
|
|
541
|
+
**Value:**
|
|
542
|
+
- Bugs caught by automation
|
|
543
|
+
- Regressions prevented
|
|
544
|
+
- Time saved vs manual testing
|
|
545
|
+
|
|
546
|
+
### Metrics That Don't Matter Much
|
|
547
|
+
|
|
548
|
+
- ❌ Number of automated tests
|
|
549
|
+
- ❌ Lines of test code
|
|
550
|
+
- ❌ 100% code coverage (diminishing returns)
|
|
551
|
+
|
|
552
|
+
## Test Automation Strategy Document
|
|
553
|
+
|
|
554
|
+
```markdown
|
|
555
|
+
## Test Automation Strategy - [Project Name]
|
|
556
|
+
|
|
557
|
+
### Goals
|
|
558
|
+
- 80% of regression testing automated
|
|
559
|
+
- Test suite runs in < 10 minutes
|
|
560
|
+
- < 2% flaky test rate
|
|
561
|
+
- Catch critical bugs before production
|
|
562
|
+
|
|
563
|
+
### Test Pyramid Distribution
|
|
564
|
+
- Unit: 70% (target: 2000 tests, <5 min)
|
|
565
|
+
- Integration: 20% (target: 400 tests, <3 min)
|
|
566
|
+
- E2E: 10% (target: 50 tests, <2 min)
|
|
567
|
+
|
|
568
|
+
### What We Automate
|
|
569
|
+
✅ Critical user flows (checkout, payment, signup)
|
|
570
|
+
✅ Regression-prone areas (historical bug zones)
|
|
571
|
+
✅ API contracts and integrations
|
|
572
|
+
✅ Security checks (injection, XSS)
|
|
573
|
+
✅ Performance benchmarks
|
|
574
|
+
|
|
575
|
+
### What We Don't Automate
|
|
576
|
+
❌ Visual design (manual review)
|
|
577
|
+
❌ Usability testing (requires human judgment)
|
|
578
|
+
❌ Exploratory testing (human investigation)
|
|
579
|
+
❌ One-time migrations
|
|
580
|
+
❌ Frequently changing features (manual until stable)
|
|
581
|
+
|
|
582
|
+
### Tools
|
|
583
|
+
- Unit: Jest
|
|
584
|
+
- Integration: Supertest
|
|
585
|
+
- E2E: Playwright
|
|
586
|
+
- CI: GitHub Actions
|
|
587
|
+
- Test Data: Factory functions + database seeding
|
|
588
|
+
|
|
589
|
+
### Maintenance
|
|
590
|
+
- Review flaky tests weekly
|
|
591
|
+
- Update tests when features change
|
|
592
|
+
- Delete tests for removed features
|
|
593
|
+
- Refactor tests quarterly
|
|
594
|
+
|
|
595
|
+
### Success Criteria
|
|
596
|
+
- Deploy to production daily with confidence
|
|
597
|
+
- Catch 90% of bugs before production
|
|
598
|
+
- Test suite stays fast (<10 min)
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
## Growing Automation Gradually
|
|
602
|
+
|
|
603
|
+
### Phase 1: Foundation (Month 1-2)
|
|
604
|
+
- Set up CI pipeline
|
|
605
|
+
- Write unit tests for new code
|
|
606
|
+
- Automate smoke tests
|
|
607
|
+
- Target: 40% unit test coverage of critical code
|
|
608
|
+
|
|
609
|
+
### Phase 2: Core Flows (Month 3-4)
|
|
610
|
+
- Automate critical happy paths (E2E)
|
|
611
|
+
- Add integration tests for APIs
|
|
612
|
+
- Implement page object model
|
|
613
|
+
- Target: 5-10 stable E2E tests
|
|
614
|
+
|
|
615
|
+
### Phase 3: Expansion (Month 5-6)
|
|
616
|
+
- Increase unit test coverage to 60%
|
|
617
|
+
- Add edge case integration tests
|
|
618
|
+
- Automate top 10 bug-prone areas
|
|
619
|
+
- Target: Fast feedback (<10 min CI run)
|
|
620
|
+
|
|
621
|
+
### Phase 4: Optimization (Month 7+)
|
|
622
|
+
- Parallelize test execution
|
|
623
|
+
- Refactor duplicate test code
|
|
624
|
+
- Fix all flaky tests
|
|
625
|
+
- Target: Deploy multiple times daily
|
|
626
|
+
|
|
627
|
+
## Using with QE Agents
|
|
628
|
+
|
|
629
|
+
### Agent-Driven Test Pyramid
|
|
630
|
+
|
|
631
|
+
**qe-test-generator** builds the pyramid intelligently:
|
|
632
|
+
```typescript
|
|
633
|
+
// Generate unit tests (70% of pyramid)
|
|
634
|
+
await agent.generateTests({
|
|
635
|
+
level: 'unit',
|
|
636
|
+
target: 'src/services/PaymentService.ts',
|
|
637
|
+
coverage: 'comprehensive'
|
|
638
|
+
});
|
|
639
|
+
// → Fast, isolated tests for business logic
|
|
640
|
+
|
|
641
|
+
// Generate integration tests (20% of pyramid)
|
|
642
|
+
await agent.generateTests({
|
|
643
|
+
level: 'integration',
|
|
644
|
+
target: 'src/api/orders',
|
|
645
|
+
focus: 'database-interactions'
|
|
646
|
+
});
|
|
647
|
+
// → Tests for component integration
|
|
648
|
+
|
|
649
|
+
// Generate E2E tests (10% of pyramid)
|
|
650
|
+
await agent.generateTests({
|
|
651
|
+
level: 'e2e',
|
|
652
|
+
flows: ['checkout', 'payment'],
|
|
653
|
+
priority: 'critical-paths-only'
|
|
654
|
+
});
|
|
655
|
+
// → Minimal UI tests for happy paths
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
### Intelligent Test Selection
|
|
659
|
+
|
|
660
|
+
**qe-regression-risk-analyzer** optimizes what to automate:
|
|
661
|
+
```typescript
|
|
662
|
+
// Analyze which tests provide most value
|
|
663
|
+
const analysis = await agent.analyzeAutomationValue({
|
|
664
|
+
candidates: allManualTests,
|
|
665
|
+
criteria: ['repetition', 'stability', 'risk', 'execution-time']
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
// Returns prioritized list
|
|
669
|
+
// High value: Frequent + stable + high-risk + fast
|
|
670
|
+
// Low value: Rare + changing + low-risk + slow
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### CI/CD Pipeline with Agent Coordination
|
|
674
|
+
|
|
675
|
+
```yaml
|
|
676
|
+
# Agents integrated into CI pipeline
|
|
677
|
+
name: QE Agent Pipeline
|
|
678
|
+
|
|
679
|
+
on: [push, pull_request]
|
|
680
|
+
|
|
681
|
+
jobs:
|
|
682
|
+
fast-feedback:
|
|
683
|
+
runs-on: ubuntu-latest
|
|
684
|
+
steps:
|
|
685
|
+
# Unit tests with qe-test-executor
|
|
686
|
+
- name: Unit Tests
|
|
687
|
+
run: aqe agent run qe-test-executor --level unit --parallel
|
|
688
|
+
# → <5 minutes
|
|
689
|
+
|
|
690
|
+
comprehensive-check:
|
|
691
|
+
needs: fast-feedback
|
|
692
|
+
steps:
|
|
693
|
+
# Integration tests
|
|
694
|
+
- name: Integration Tests
|
|
695
|
+
run: aqe agent run qe-test-executor --level integration
|
|
696
|
+
# → <10 minutes
|
|
697
|
+
|
|
698
|
+
# Coverage analysis
|
|
699
|
+
- name: Coverage Analysis
|
|
700
|
+
run: aqe agent run qe-coverage-analyzer --threshold 80
|
|
701
|
+
# → Identifies gaps in real-time
|
|
702
|
+
|
|
703
|
+
deployment-gate:
|
|
704
|
+
needs: comprehensive-check
|
|
705
|
+
steps:
|
|
706
|
+
# E2E critical paths
|
|
707
|
+
- name: E2E Tests
|
|
708
|
+
run: aqe agent run qe-test-executor --level e2e --critical-only
|
|
709
|
+
|
|
710
|
+
# Quality gate decision
|
|
711
|
+
- name: Quality Gate
|
|
712
|
+
run: aqe agent run qe-quality-gate
|
|
713
|
+
# → GO/NO-GO decision
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### Flaky Test Management with Agents
|
|
717
|
+
|
|
718
|
+
**qe-flaky-test-hunter** identifies and fixes flaky tests:
|
|
719
|
+
```typescript
|
|
720
|
+
// Detect flakiness patterns
|
|
721
|
+
await agent.huntFlakyTests({
|
|
722
|
+
suite: 'all',
|
|
723
|
+
runs: 100,
|
|
724
|
+
statisticalConfidence: 0.95
|
|
725
|
+
});
|
|
726
|
+
// → Identifies tests with <95% pass rate
|
|
727
|
+
|
|
728
|
+
// Auto-stabilize common patterns
|
|
729
|
+
await agent.stabilizeTests({
|
|
730
|
+
pattern: 'race-conditions',
|
|
731
|
+
fix: 'add-explicit-waits'
|
|
732
|
+
});
|
|
733
|
+
// → Converts sleep() to waitFor()
|
|
734
|
+
|
|
735
|
+
// Quarantine unfixable tests
|
|
736
|
+
await agent.quarantine({
|
|
737
|
+
flakiness: '>10%',
|
|
738
|
+
action: 'skip-and-ticket'
|
|
739
|
+
});
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
### Agent-Assisted Test Data Strategy
|
|
743
|
+
|
|
744
|
+
**qe-test-data-architect** generates test data:
|
|
745
|
+
```typescript
|
|
746
|
+
// Generate isolated test data per test
|
|
747
|
+
const testData = await agent.generateTestData({
|
|
748
|
+
schema: 'users',
|
|
749
|
+
count: 100,
|
|
750
|
+
realistic: true,
|
|
751
|
+
isolation: 'per-test' // Each test gets unique data
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
// Generate edge cases
|
|
755
|
+
const edgeCases = await agent.generateEdgeCases({
|
|
756
|
+
field: 'email',
|
|
757
|
+
patterns: ['special-chars', 'unicode', 'max-length']
|
|
758
|
+
});
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
### Fleet Coordination for Test Automation
|
|
762
|
+
|
|
763
|
+
```typescript
|
|
764
|
+
// Coordinate multiple agents for automation strategy
|
|
765
|
+
const automationFleet = await FleetManager.coordinate({
|
|
766
|
+
strategy: 'test-automation',
|
|
767
|
+
agents: [
|
|
768
|
+
'qe-test-generator', // Generate tests
|
|
769
|
+
'qe-test-executor', // Execute in CI
|
|
770
|
+
'qe-coverage-analyzer', // Analyze gaps
|
|
771
|
+
'qe-flaky-test-hunter', // Fix flakiness
|
|
772
|
+
'qe-regression-risk-analyzer' // Optimize selection
|
|
773
|
+
],
|
|
774
|
+
topology: 'sequential'
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// Execute full automation workflow
|
|
778
|
+
await automationFleet.execute({
|
|
779
|
+
scope: 'payment-module',
|
|
780
|
+
pyramidBalance: { unit: 0.7, integration: 0.2, e2e: 0.1 }
|
|
781
|
+
});
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
### Strategic Automation Decisions with Agent Insights
|
|
785
|
+
|
|
786
|
+
```typescript
|
|
787
|
+
// Agent helps decide what to automate
|
|
788
|
+
const recommendation = await qe-quality-analyzer.recommendAutomation({
|
|
789
|
+
feature: 'checkout-flow',
|
|
790
|
+
currentCoverage: 'manual-only',
|
|
791
|
+
executionFrequency: 'daily',
|
|
792
|
+
stability: 'stable',
|
|
793
|
+
risk: 'high'
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
// Returns:
|
|
797
|
+
// {
|
|
798
|
+
// shouldAutomate: true,
|
|
799
|
+
// level: 'integration', // Skip E2E, test via API
|
|
800
|
+
// priority: 'high',
|
|
801
|
+
// estimatedROI: '15 hours saved/month',
|
|
802
|
+
// maintainanceCost: 'low'
|
|
803
|
+
// }
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
---
|
|
807
|
+
|
|
808
|
+
## Related Skills
|
|
809
|
+
|
|
810
|
+
**Core Quality Practices:**
|
|
811
|
+
- [agentic-quality-engineering](../agentic-quality-engineering/) - Agent orchestration for automation
|
|
812
|
+
- [holistic-testing-pact](../holistic-testing-pact/) - Automation within whole-team quality
|
|
813
|
+
|
|
814
|
+
**Development Practices:**
|
|
815
|
+
- [tdd-london-chicago](../tdd-london-chicago/) - TDD drives automation at unit level
|
|
816
|
+
- [xp-practices](../xp-practices/) - CI/CD integration with automation
|
|
817
|
+
|
|
818
|
+
**Testing Specializations:**
|
|
819
|
+
- [api-testing-patterns](../api-testing-patterns/) - API automation strategies
|
|
820
|
+
- [performance-testing](../performance-testing/) - Performance automation
|
|
821
|
+
- [security-testing](../security-testing/) - Security scan automation
|
|
822
|
+
- [exploratory-testing-advanced](../exploratory-testing-advanced/) - Balance with manual exploration
|
|
823
|
+
|
|
824
|
+
**Communication:**
|
|
825
|
+
- [quality-metrics](../quality-metrics/) - Measure automation effectiveness
|
|
826
|
+
|
|
827
|
+
---
|
|
828
|
+
|
|
829
|
+
## Remember
|
|
830
|
+
|
|
831
|
+
**Automation is a means, not an end.**
|
|
832
|
+
|
|
833
|
+
The goal is confident, frequent deployments of high-quality software. Automation enables that by:
|
|
834
|
+
- Giving fast feedback
|
|
835
|
+
- Catching regressions
|
|
836
|
+
- Freeing humans for skilled testing
|
|
837
|
+
|
|
838
|
+
Don't automate for automation's sake. Automate strategically.
|
|
839
|
+
|
|
840
|
+
**Good automation amplifies good testing. Bad automation wastes everyone's time.**
|
|
841
|
+
|
|
842
|
+
**With Agents**: Agents excel at maintaining the test pyramid, detecting flakiness, optimizing test selection, and coordinating CI/CD pipelines. Use agents to automate the automation strategy itself.
|