agentic-qe 1.2.0 → 1.3.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/settings.json +44 -6
- package/.claude/skills/accessibility-testing/SKILL.md +777 -0
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +109 -0
- package/.claude/skills/compatibility-testing/SKILL.md +101 -0
- package/.claude/skills/compliance-testing/SKILL.md +162 -0
- package/.claude/skills/contract-testing/SKILL.md +193 -0
- package/.claude/skills/database-testing/SKILL.md +243 -0
- package/.claude/skills/localization-testing/SKILL.md +115 -0
- package/.claude/skills/mobile-testing/SKILL.md +548 -0
- package/.claude/skills/mutation-testing/SKILL.md +129 -0
- package/.claude/skills/regression-testing/SKILL.md +1045 -0
- package/.claude/skills/shift-left-testing/SKILL.md +535 -0
- package/.claude/skills/shift-right-testing/SKILL.md +591 -0
- package/.claude/skills/test-data-management/SKILL.md +1067 -0
- package/.claude/skills/test-design-techniques/SKILL.md +160 -0
- package/.claude/skills/test-environment-management/SKILL.md +204 -0
- package/.claude/skills/test-reporting-analytics/SKILL.md +143 -0
- package/.claude/skills/visual-testing-advanced/SKILL.md +148 -0
- package/CHANGELOG.md +88 -6
- package/README.md +15 -8
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +5 -4
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.js +9 -8
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.js +3 -2
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
- package/dist/agents/FleetCommanderAgent.js +2 -1
- package/dist/agents/FleetCommanderAgent.js.map +1 -1
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
- package/dist/agents/PerformanceTesterAgent.js +7 -6
- package/dist/agents/PerformanceTesterAgent.js.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.js +7 -6
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.js +37 -36
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
- package/dist/agents/QualityGateAgent.d.ts.map +1 -1
- package/dist/agents/QualityGateAgent.js +2 -1
- package/dist/agents/QualityGateAgent.js.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.js +15 -14
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
- package/dist/agents/SecurityScannerAgent.js +2 -1
- package/dist/agents/SecurityScannerAgent.js.map +1 -1
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -1
- package/dist/agents/TestDataArchitectAgent.js +12 -11
- package/dist/agents/TestDataArchitectAgent.js.map +1 -1
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
- package/dist/agents/TestExecutorAgent.js +17 -16
- package/dist/agents/TestExecutorAgent.js.map +1 -1
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
- package/dist/agents/TestGeneratorAgent.js +10 -9
- package/dist/agents/TestGeneratorAgent.js.map +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/cli/commands/agent/benchmark.d.ts.map +1 -1
- package/dist/cli/commands/agent/benchmark.js +2 -1
- package/dist/cli/commands/agent/benchmark.js.map +1 -1
- package/dist/cli/commands/agent/spawn.d.ts.map +1 -1
- package/dist/cli/commands/agent/spawn.js +2 -1
- package/dist/cli/commands/agent/spawn.js.map +1 -1
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +2 -1
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/config/list.d.ts.map +1 -1
- package/dist/cli/commands/config/list.js +2 -1
- package/dist/cli/commands/config/list.js.map +1 -1
- package/dist/cli/commands/config/set.d.ts +7 -0
- package/dist/cli/commands/config/set.d.ts.map +1 -1
- package/dist/cli/commands/config/set.js +35 -4
- package/dist/cli/commands/config/set.js.map +1 -1
- package/dist/cli/commands/fleet/logs.d.ts.map +1 -1
- package/dist/cli/commands/fleet/logs.js +2 -1
- package/dist/cli/commands/fleet/logs.js.map +1 -1
- package/dist/cli/commands/fleet/metrics.d.ts.map +1 -1
- package/dist/cli/commands/fleet/metrics.js +2 -1
- package/dist/cli/commands/fleet/metrics.js.map +1 -1
- package/dist/cli/commands/fleet/monitor.d.ts.map +1 -1
- package/dist/cli/commands/fleet/monitor.js +7 -5
- package/dist/cli/commands/fleet/monitor.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts.map +1 -1
- package/dist/cli/commands/fleet.js +2 -1
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/improve/index.d.ts.map +1 -1
- package/dist/cli/commands/improve/index.js +12 -11
- package/dist/cli/commands/improve/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +40 -16
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learn/index.d.ts.map +1 -1
- package/dist/cli/commands/learn/index.js +13 -12
- package/dist/cli/commands/learn/index.js.map +1 -1
- package/dist/cli/commands/monitor/alerts.d.ts.map +1 -1
- package/dist/cli/commands/monitor/alerts.js +2 -1
- package/dist/cli/commands/monitor/alerts.js.map +1 -1
- package/dist/cli/commands/patterns/index.d.ts.map +1 -1
- package/dist/cli/commands/patterns/index.js +20 -19
- package/dist/cli/commands/patterns/index.js.map +1 -1
- package/dist/cli/commands/quality/decision.d.ts.map +1 -1
- package/dist/cli/commands/quality/decision.js +9 -7
- package/dist/cli/commands/quality/decision.js.map +1 -1
- package/dist/cli/commands/quality/gate.d.ts.map +1 -1
- package/dist/cli/commands/quality/gate.js +10 -8
- package/dist/cli/commands/quality/gate.js.map +1 -1
- package/dist/cli/commands/quality/policy.d.ts.map +1 -1
- package/dist/cli/commands/quality/policy.js +10 -8
- package/dist/cli/commands/quality/policy.js.map +1 -1
- package/dist/cli/commands/quality/risk.d.ts.map +1 -1
- package/dist/cli/commands/quality/risk.js +5 -3
- package/dist/cli/commands/quality/risk.js.map +1 -1
- package/dist/cli/commands/quality/validate.d.ts.map +1 -1
- package/dist/cli/commands/quality/validate.js +10 -8
- package/dist/cli/commands/quality/validate.js.map +1 -1
- package/dist/cli/commands/quantization.d.ts +6 -0
- package/dist/cli/commands/quantization.d.ts.map +1 -0
- package/dist/cli/commands/quantization.js +188 -0
- package/dist/cli/commands/quantization.js.map +1 -0
- package/dist/cli/commands/routing/index.d.ts +0 -6
- package/dist/cli/commands/routing/index.d.ts.map +1 -1
- package/dist/cli/commands/routing/index.js +17 -16
- package/dist/cli/commands/routing/index.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +2 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/skills/index.d.ts.map +1 -1
- package/dist/cli/commands/skills/index.js +10 -9
- package/dist/cli/commands/skills/index.js.map +1 -1
- package/dist/cli/commands/test/debug.d.ts.map +1 -1
- package/dist/cli/commands/test/debug.js +2 -1
- package/dist/cli/commands/test/debug.js.map +1 -1
- package/dist/cli/commands/test/mutate.d.ts.map +1 -1
- package/dist/cli/commands/test/mutate.js +2 -1
- package/dist/cli/commands/test/mutate.js.map +1 -1
- package/dist/cli/commands/test/parallel.d.ts.map +1 -1
- package/dist/cli/commands/test/parallel.js +6 -4
- package/dist/cli/commands/test/parallel.js.map +1 -1
- package/dist/cli/commands/test/profile.d.ts.map +1 -1
- package/dist/cli/commands/test/profile.js +3 -2
- package/dist/cli/commands/test/profile.js.map +1 -1
- package/dist/cli/commands/test/queue.d.ts.map +1 -1
- package/dist/cli/commands/test/queue.js +2 -1
- package/dist/cli/commands/test/queue.js.map +1 -1
- package/dist/cli/commands/test/retry.d.ts.map +1 -1
- package/dist/cli/commands/test/retry.js +6 -4
- package/dist/cli/commands/test/retry.js.map +1 -1
- package/dist/cli/commands/test/trace.d.ts.map +1 -1
- package/dist/cli/commands/test/trace.js +2 -1
- package/dist/cli/commands/test/trace.js.map +1 -1
- package/dist/cli/commands/test/watch.d.ts.map +1 -1
- package/dist/cli/commands/test/watch.js +3 -2
- package/dist/cli/commands/test/watch.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +2 -1
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/index-working.js +9 -8
- package/dist/cli/index-working.js.map +1 -1
- package/dist/cli/index.js +5 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/coordination/OODACoordination.d.ts.map +1 -1
- package/dist/core/coordination/OODACoordination.js +2 -1
- package/dist/core/coordination/OODACoordination.js.map +1 -1
- package/dist/core/memory/AgentDBManager.d.ts.map +1 -1
- package/dist/core/memory/AgentDBManager.js +2 -19
- package/dist/core/memory/AgentDBManager.js.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.js +4 -3
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
- package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -1
- package/dist/core/memory/ReasoningBankAdapter.js +2 -5
- package/dist/core/memory/ReasoningBankAdapter.js.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +4 -3
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/neural/NeuralTrainer.d.ts.map +1 -1
- package/dist/core/neural/NeuralTrainer.js +3 -2
- package/dist/core/neural/NeuralTrainer.js.map +1 -1
- package/dist/core/quantization/QuantizationManager.d.ts +83 -0
- package/dist/core/quantization/QuantizationManager.d.ts.map +1 -0
- package/dist/core/quantization/QuantizationManager.js +264 -0
- package/dist/core/quantization/QuantizationManager.js.map +1 -0
- package/dist/core/quantization/index.d.ts +5 -0
- package/dist/core/quantization/index.d.ts.map +1 -0
- package/dist/core/quantization/index.js +9 -0
- package/dist/core/quantization/index.js.map +1 -0
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts +3 -3
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/advanced/mutation-test-execute.js +5 -4
- package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -1
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
- package/dist/mcp/handlers/agent-spawn.js +2 -1
- package/dist/mcp/handlers/agent-spawn.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +9 -8
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js +6 -5
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js +5 -4
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +8 -7
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +7 -6
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js +18 -21
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -1
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/base-handler.js +2 -9
- package/dist/mcp/handlers/base-handler.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +4 -3
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +6 -5
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.js +2 -1
- package/dist/mcp/handlers/coordination/event-emit.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js +2 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-create.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +2 -1
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-status.js +31 -30
- package/dist/mcp/handlers/fleet-status.js.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.js +3 -2
- package/dist/mcp/handlers/integration/dependency-check.js.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js +2 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -1
- package/dist/mcp/handlers/optimize-tests.js +33 -32
- package/dist/mcp/handlers/optimize-tests.js.map +1 -1
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -1
- package/dist/mcp/handlers/predict-defects.js +46 -45
- package/dist/mcp/handlers/predict-defects.js.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js +24 -23
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.js +10 -9
- package/dist/mcp/handlers/prediction/predict-defects-ai.js.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js +10 -9
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.js +7 -6
- package/dist/mcp/handlers/prediction/visual-test-regression.js.map +1 -1
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/quality-analyze.js +53 -52
- package/dist/mcp/handlers/quality-analyze.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +19 -18
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.js +7 -6
- package/dist/mcp/handlers/test/test-execute-parallel.js.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js +2 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.js +3 -2
- package/dist/mcp/handlers/test/test-optimize-sublinear.js.map +1 -1
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/test-execute.js +11 -10
- package/dist/mcp/handlers/test-execute.js.map +1 -1
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -1
- package/dist/mcp/handlers/test-generate.js +4 -3
- package/dist/mcp/handlers/test-generate.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +2 -1
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js +10 -9
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.d.ts.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.js +2 -1
- package/dist/mcp/streaming/StreamingMCPTool.js.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.js +6 -5
- package/dist/mcp/streaming/TestExecuteStreamHandler.js.map +1 -1
- package/dist/reasoning/TestTemplateCreator.d.ts +10 -2
- package/dist/reasoning/TestTemplateCreator.d.ts.map +1 -1
- package/dist/reasoning/TestTemplateCreator.js +81 -21
- package/dist/reasoning/TestTemplateCreator.js.map +1 -1
- package/dist/types/pattern.types.d.ts +39 -3
- package/dist/types/pattern.types.d.ts.map +1 -1
- package/dist/utils/Config.js +2 -2
- package/dist/utils/Config.js.map +1 -1
- package/dist/utils/ProcessExit.d.ts +23 -0
- package/dist/utils/ProcessExit.d.ts.map +1 -0
- package/dist/utils/ProcessExit.js +40 -0
- package/dist/utils/ProcessExit.js.map +1 -0
- package/dist/utils/SecureRandom.d.ts +171 -0
- package/dist/utils/SecureRandom.d.ts.map +1 -0
- package/dist/utils/SecureRandom.js +229 -0
- package/dist/utils/SecureRandom.js.map +1 -0
- package/dist/utils/SecureUrlValidator.d.ts +167 -0
- package/dist/utils/SecureUrlValidator.d.ts.map +1 -0
- package/dist/utils/SecureUrlValidator.js +306 -0
- package/dist/utils/SecureUrlValidator.js.map +1 -0
- package/dist/utils/SecureValidation.d.ts +131 -0
- package/dist/utils/SecureValidation.d.ts.map +1 -0
- package/dist/utils/SecureValidation.js +265 -0
- package/dist/utils/SecureValidation.js.map +1 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +5 -4
- package/dist/utils/validation.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-design-techniques
|
|
3
|
+
description: Systematic test design with boundary value analysis, equivalence partitioning, decision tables, state transition testing, and combinatorial testing. Use when designing comprehensive test cases, reducing redundant tests, or ensuring systematic coverage.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: testing-methodologies
|
|
6
|
+
tags: [test-design, bva, equivalence-partitioning, decision-tables, combinatorial-testing, pairwise]
|
|
7
|
+
difficulty: intermediate
|
|
8
|
+
estimated_time: 75 minutes
|
|
9
|
+
author: agentic-qe
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Test Design Techniques
|
|
13
|
+
|
|
14
|
+
## Core Principle
|
|
15
|
+
|
|
16
|
+
**Systematic test design finds more bugs with fewer tests.**
|
|
17
|
+
|
|
18
|
+
Random testing is inefficient. Proven test design techniques (40+ years of research) systematically identify high-value test cases, reduce redundancy, and maximize bug detection.
|
|
19
|
+
|
|
20
|
+
## Boundary Value Analysis (BVA)
|
|
21
|
+
|
|
22
|
+
**Principle:** Bugs cluster at boundaries of valid input ranges.
|
|
23
|
+
|
|
24
|
+
**Test at:**
|
|
25
|
+
- Minimum valid value
|
|
26
|
+
- Just below minimum (invalid)
|
|
27
|
+
- Just above minimum (valid)
|
|
28
|
+
- Maximum valid value
|
|
29
|
+
- Just above maximum (invalid)
|
|
30
|
+
- Just below maximum (valid)
|
|
31
|
+
|
|
32
|
+
**Example: Age field (18-120)**
|
|
33
|
+
```
|
|
34
|
+
Test Cases:
|
|
35
|
+
✓ 17 - Just below min (invalid, reject)
|
|
36
|
+
✓ 18 - Minimum valid (accept)
|
|
37
|
+
✓ 19 - Just above min (accept)
|
|
38
|
+
✓ 119 - Just below max (accept)
|
|
39
|
+
✓ 120 - Maximum valid (accept)
|
|
40
|
+
✓ 121 - Just above max (invalid, reject)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**With Agents:**
|
|
44
|
+
```typescript
|
|
45
|
+
// qe-test-generator automatically identifies boundaries
|
|
46
|
+
const tests = await agent.generateBVATests({
|
|
47
|
+
field: 'age',
|
|
48
|
+
dataType: 'integer',
|
|
49
|
+
constraints: { min: 18, max: 120 }
|
|
50
|
+
});
|
|
51
|
+
// Returns: 6 boundary test cases
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Equivalence Partitioning (EP)
|
|
55
|
+
|
|
56
|
+
**Principle:** Divide input into partitions where all values behave the same.
|
|
57
|
+
|
|
58
|
+
**Example: Discount based on quantity**
|
|
59
|
+
```
|
|
60
|
+
Quantity Rules:
|
|
61
|
+
1-10: No discount
|
|
62
|
+
11-100: 10% discount
|
|
63
|
+
101+: 20% discount
|
|
64
|
+
|
|
65
|
+
Partitions:
|
|
66
|
+
1. Invalid: quantity ≤ 0
|
|
67
|
+
2. Valid, no discount: 1-10
|
|
68
|
+
3. Valid, 10% discount: 11-100
|
|
69
|
+
4. Valid, 20% discount: 101+
|
|
70
|
+
|
|
71
|
+
Test Cases (1 per partition):
|
|
72
|
+
✓ -1 → Reject
|
|
73
|
+
✓ 5 → 0% discount
|
|
74
|
+
✓ 50 → 10% discount
|
|
75
|
+
✓ 200 → 20% discount
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Decision Tables
|
|
79
|
+
|
|
80
|
+
**Use for:** Complex business rules with multiple conditions.
|
|
81
|
+
|
|
82
|
+
**Example: Loan Approval**
|
|
83
|
+
```
|
|
84
|
+
Conditions:
|
|
85
|
+
- Age ≥ 18
|
|
86
|
+
- Credit Score ≥ 700
|
|
87
|
+
- Income ≥ $50k
|
|
88
|
+
|
|
89
|
+
Rule 1 | Rule 2 | Rule 3 | Rule 4 | Rule 5
|
|
90
|
+
-------|--------|--------|--------|-------
|
|
91
|
+
Yes | Yes | Yes | No | Yes
|
|
92
|
+
Yes | Yes | No | Yes | No
|
|
93
|
+
Yes | No | Yes | Yes | Yes
|
|
94
|
+
-------+--------+--------+--------+-------
|
|
95
|
+
Approve| Approve| Reject | Reject | Reject
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Test Cases:** 5 tests cover all decision combinations.
|
|
99
|
+
|
|
100
|
+
## State Transition Testing
|
|
101
|
+
|
|
102
|
+
**Model state changes:**
|
|
103
|
+
```
|
|
104
|
+
States: Logged Out → Logged In → Premium → Suspended
|
|
105
|
+
|
|
106
|
+
Transitions:
|
|
107
|
+
Login: Logged Out → Logged In
|
|
108
|
+
Upgrade: Logged In → Premium
|
|
109
|
+
Payment Fail: Premium → Suspended
|
|
110
|
+
Logout: Any → Logged Out
|
|
111
|
+
|
|
112
|
+
Invalid Transitions to Test:
|
|
113
|
+
Logged Out → Premium (should reject)
|
|
114
|
+
Suspended → Premium (should reject)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Pairwise (Combinatorial) Testing
|
|
118
|
+
|
|
119
|
+
**Problem:** Testing all combinations explodes.
|
|
120
|
+
|
|
121
|
+
**Example: Cross-browser testing**
|
|
122
|
+
```
|
|
123
|
+
Browser: Chrome, Firefox, Safari (3)
|
|
124
|
+
OS: Windows, Mac, Linux (3)
|
|
125
|
+
Screen: Desktop, Tablet, Mobile (3)
|
|
126
|
+
|
|
127
|
+
All combinations: 3 × 3 × 3 = 27 tests
|
|
128
|
+
|
|
129
|
+
Pairwise: 9 tests cover all pairs
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**With Agents:**
|
|
133
|
+
```typescript
|
|
134
|
+
// qe-test-generator does pairwise reduction
|
|
135
|
+
const tests = await agent.generatePairwiseTests({
|
|
136
|
+
parameters: {
|
|
137
|
+
browser: ['Chrome', 'Firefox', 'Safari'],
|
|
138
|
+
os: ['Windows', 'Mac', 'Linux'],
|
|
139
|
+
screen: ['Desktop', 'Tablet', 'Mobile']
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
// Returns: 9-12 tests (vs 27 full combination)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Related Skills
|
|
146
|
+
|
|
147
|
+
- [agentic-quality-engineering](../agentic-quality-engineering/)
|
|
148
|
+
- [test-automation-strategy](../test-automation-strategy/)
|
|
149
|
+
- [risk-based-testing](../risk-based-testing/)
|
|
150
|
+
|
|
151
|
+
## Remember
|
|
152
|
+
|
|
153
|
+
**Systematic design > Random testing**
|
|
154
|
+
|
|
155
|
+
- BVA finds boundary bugs
|
|
156
|
+
- EP reduces redundant tests
|
|
157
|
+
- Decision tables handle complexity
|
|
158
|
+
- Pairwise reduces combinatorial explosion
|
|
159
|
+
|
|
160
|
+
**With Agents:** `qe-test-generator` applies these techniques automatically, generating optimal test suites with maximum coverage and minimum redundancy.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-environment-management
|
|
3
|
+
description: Test environment provisioning, infrastructure as code for testing, Docker/Kubernetes for test environments, service virtualization, and cost optimization. Use when managing test infrastructure, ensuring environment parity, or optimizing testing costs.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: testing-infrastructure
|
|
6
|
+
tags: [test-environments, docker, kubernetes, infrastructure-as-code, service-virtualization, environment-parity]
|
|
7
|
+
difficulty: advanced
|
|
8
|
+
estimated_time: 75 minutes
|
|
9
|
+
author: agentic-qe
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Test Environment Management
|
|
13
|
+
|
|
14
|
+
## Core Principle
|
|
15
|
+
|
|
16
|
+
**Unstable test environments = unreliable tests.**
|
|
17
|
+
|
|
18
|
+
Test environment management ensures consistent, reproducible environments for testing while optimizing cost and maintenance.
|
|
19
|
+
|
|
20
|
+
## Environment Types
|
|
21
|
+
|
|
22
|
+
### Local Development
|
|
23
|
+
```
|
|
24
|
+
Developer machine
|
|
25
|
+
- Fast feedback
|
|
26
|
+
- Full control
|
|
27
|
+
- May differ from production
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### CI Environment
|
|
31
|
+
```
|
|
32
|
+
GitHub Actions, Jenkins, etc.
|
|
33
|
+
- Automated tests
|
|
34
|
+
- Ephemeral (created per build)
|
|
35
|
+
- Must match production closely
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Staging/QA Environment
|
|
39
|
+
```
|
|
40
|
+
Pre-production mirror
|
|
41
|
+
- Integration testing
|
|
42
|
+
- User acceptance testing
|
|
43
|
+
- Should match production exactly
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Production (Testing in Prod)
|
|
47
|
+
```
|
|
48
|
+
Real environment
|
|
49
|
+
- Canary deployments
|
|
50
|
+
- Feature flags
|
|
51
|
+
- Synthetic monitoring
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Docker for Test Environments
|
|
55
|
+
|
|
56
|
+
**Containerize test dependencies:**
|
|
57
|
+
```yaml
|
|
58
|
+
# docker-compose.test.yml
|
|
59
|
+
version: '3.8'
|
|
60
|
+
|
|
61
|
+
services:
|
|
62
|
+
app:
|
|
63
|
+
build: .
|
|
64
|
+
ports:
|
|
65
|
+
- "3000:3000"
|
|
66
|
+
environment:
|
|
67
|
+
NODE_ENV: test
|
|
68
|
+
DATABASE_URL: postgres://postgres:password@db:5432/test
|
|
69
|
+
depends_on:
|
|
70
|
+
- db
|
|
71
|
+
- redis
|
|
72
|
+
|
|
73
|
+
db:
|
|
74
|
+
image: postgres:15
|
|
75
|
+
environment:
|
|
76
|
+
POSTGRES_DB: test
|
|
77
|
+
POSTGRES_PASSWORD: password
|
|
78
|
+
ports:
|
|
79
|
+
- "5432:5432"
|
|
80
|
+
|
|
81
|
+
redis:
|
|
82
|
+
image: redis:7
|
|
83
|
+
ports:
|
|
84
|
+
- "6379:6379"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Run tests in container:**
|
|
88
|
+
```bash
|
|
89
|
+
docker-compose -f docker-compose.test.yml up -d
|
|
90
|
+
docker-compose -f docker-compose.test.yml exec app npm test
|
|
91
|
+
docker-compose -f docker-compose.test.yml down
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Infrastructure as Code
|
|
95
|
+
|
|
96
|
+
**Terraform for test environments:**
|
|
97
|
+
```hcl
|
|
98
|
+
# test-environment.tf
|
|
99
|
+
resource "aws_instance" "test_server" {
|
|
100
|
+
ami = "ami-0c55b159cbfafe1f0"
|
|
101
|
+
instance_type = "t3.medium"
|
|
102
|
+
|
|
103
|
+
tags = {
|
|
104
|
+
Name = "test-environment"
|
|
105
|
+
Environment = "test"
|
|
106
|
+
AutoShutdown = "20:00" # Cost optimization
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
resource "aws_rds_instance" "test_db" {
|
|
111
|
+
allocated_storage = 20
|
|
112
|
+
engine = "postgres"
|
|
113
|
+
engine_version = "15"
|
|
114
|
+
instance_class = "db.t3.micro"
|
|
115
|
+
db_name = "test"
|
|
116
|
+
username = "testuser"
|
|
117
|
+
password = var.db_password
|
|
118
|
+
|
|
119
|
+
backup_retention_period = 0 # No backups needed for test
|
|
120
|
+
skip_final_snapshot = true
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Service Virtualization
|
|
125
|
+
|
|
126
|
+
**Mock external services:**
|
|
127
|
+
```javascript
|
|
128
|
+
// Use WireMock for API mocking
|
|
129
|
+
import { WireMock } from 'wiremock-captain';
|
|
130
|
+
|
|
131
|
+
const wiremock = new WireMock('http://localhost:8080');
|
|
132
|
+
|
|
133
|
+
// Mock payment gateway
|
|
134
|
+
await wiremock.register({
|
|
135
|
+
request: {
|
|
136
|
+
method: 'POST',
|
|
137
|
+
url: '/charge'
|
|
138
|
+
},
|
|
139
|
+
response: {
|
|
140
|
+
status: 200,
|
|
141
|
+
jsonBody: {
|
|
142
|
+
transactionId: '12345',
|
|
143
|
+
status: 'approved'
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// Tests use mock instead of real gateway
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Environment Parity
|
|
152
|
+
|
|
153
|
+
**Dev/Prod Parity Checklist:**
|
|
154
|
+
- [ ] Same OS and versions
|
|
155
|
+
- [ ] Same database type and version
|
|
156
|
+
- [ ] Same dependency versions
|
|
157
|
+
- [ ] Same configuration structure
|
|
158
|
+
- [ ] Same environment variables
|
|
159
|
+
|
|
160
|
+
**12-Factor App principles for parity**
|
|
161
|
+
|
|
162
|
+
## Cost Optimization
|
|
163
|
+
|
|
164
|
+
**Auto-shutdown test environments:**
|
|
165
|
+
```bash
|
|
166
|
+
# Shutdown test environments after hours
|
|
167
|
+
0 20 * * * aws ec2 stop-instances --instance-ids $(aws ec2 describe-instances --filters "Name=tag:Environment,Values=test" --query "Reservations[].Instances[].InstanceId" --output text)
|
|
168
|
+
|
|
169
|
+
# Start before work hours
|
|
170
|
+
0 7 * * 1-5 aws ec2 start-instances --instance-ids $(aws ec2 describe-instances --filters "Name=tag:Environment,Values=test" --query "Reservations[].Instances[].InstanceId" --output text)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Use spot instances for test workloads:**
|
|
174
|
+
```hcl
|
|
175
|
+
resource "aws_instance" "test_runner" {
|
|
176
|
+
instance_type = "c5.2xlarge"
|
|
177
|
+
instance_market_options {
|
|
178
|
+
market_type = "spot"
|
|
179
|
+
spot_options {
|
|
180
|
+
max_price = "0.10" # Save 70% vs on-demand
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Related Skills
|
|
187
|
+
|
|
188
|
+
- [test-data-management](../test-data-management/)
|
|
189
|
+
- [continuous-testing-shift-left](../continuous-testing-shift-left/)
|
|
190
|
+
- [test-automation-strategy](../test-automation-strategy/)
|
|
191
|
+
|
|
192
|
+
## Remember
|
|
193
|
+
|
|
194
|
+
**Environment inconsistency = flaky tests.**
|
|
195
|
+
|
|
196
|
+
"Works on my machine" problems from:
|
|
197
|
+
- Different OS/versions
|
|
198
|
+
- Missing dependencies
|
|
199
|
+
- Configuration differences
|
|
200
|
+
- Data differences
|
|
201
|
+
|
|
202
|
+
**Infrastructure as Code ensures repeatability.**
|
|
203
|
+
|
|
204
|
+
**With Agents:** Agents automatically provision test environments, ensure parity with production, and optimize costs by auto-scaling and auto-shutdown.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-reporting-analytics
|
|
3
|
+
description: Advanced test reporting, quality dashboards, predictive analytics, trend analysis, and executive reporting for QE metrics. Use when communicating quality status, tracking trends, or making data-driven decisions.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: quality-management
|
|
6
|
+
tags: [test-reporting, analytics, dashboards, metrics, kpis, executive-reporting]
|
|
7
|
+
difficulty: intermediate
|
|
8
|
+
estimated_time: 60 minutes
|
|
9
|
+
author: agentic-qe
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Test Reporting & Analytics
|
|
13
|
+
|
|
14
|
+
## Core Principle
|
|
15
|
+
|
|
16
|
+
**Measure to improve. Report to communicate.**
|
|
17
|
+
|
|
18
|
+
Test reporting transforms raw test data into actionable insights. Analytics enable data-driven quality decisions.
|
|
19
|
+
|
|
20
|
+
## Key Metrics
|
|
21
|
+
|
|
22
|
+
### Test Execution Metrics
|
|
23
|
+
- Pass/Fail rate
|
|
24
|
+
- Flaky test percentage
|
|
25
|
+
- Execution time (total, per test)
|
|
26
|
+
- Test coverage (code, requirements)
|
|
27
|
+
|
|
28
|
+
### Quality Metrics
|
|
29
|
+
- Defect density
|
|
30
|
+
- Defect detection rate
|
|
31
|
+
- Escaped defects
|
|
32
|
+
- Mean time to detect (MTTD)
|
|
33
|
+
- Mean time to resolve (MTTR)
|
|
34
|
+
|
|
35
|
+
### Efficiency Metrics
|
|
36
|
+
- Automation rate
|
|
37
|
+
- Test maintenance cost
|
|
38
|
+
- ROI of automation
|
|
39
|
+
- Velocity (features tested/sprint)
|
|
40
|
+
|
|
41
|
+
## Dashboards
|
|
42
|
+
|
|
43
|
+
**Real-Time Quality Dashboard:**
|
|
44
|
+
```
|
|
45
|
+
+------------------+------------------+------------------+
|
|
46
|
+
| Tests Passed | Code Coverage | Flaky Tests |
|
|
47
|
+
| 1,247 / 1,250 | 82.3% | 1.2% |
|
|
48
|
+
| 99.76% ✅ | ⬆️ +2.1% | ⬇️ -0.3% |
|
|
49
|
+
+------------------+------------------+------------------+
|
|
50
|
+
|
|
51
|
+
+------------------+------------------+------------------+
|
|
52
|
+
| Critical Bugs | Test Velocity | Deploy Freq |
|
|
53
|
+
| 0 open | 47 tests/sprint | 12x/day |
|
|
54
|
+
| ✅ | ⬆️ +5 | ⬆️ +2x |
|
|
55
|
+
+------------------+------------------+------------------+
|
|
56
|
+
|
|
57
|
+
Recent Trends (30 days):
|
|
58
|
+
[Graph showing pass rate, coverage, flaky tests over time]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Trend Analysis
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
// Identify trends
|
|
65
|
+
const testResults = await fetchTestResults(30); // 30 days
|
|
66
|
+
|
|
67
|
+
const trend = analyzeTrend(testResults, 'passRate');
|
|
68
|
+
if (trend === 'declining') {
|
|
69
|
+
alert('⚠️ Test pass rate declining for 7 days');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const coverage = analyzeTrend(testResults, 'coverage');
|
|
73
|
+
if (coverage === 'stagnant') {
|
|
74
|
+
alert('ℹ️ Code coverage unchanged. Add tests for new code.');
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Predictive Analytics
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
// Predict test failures
|
|
82
|
+
const prediction = await agent.predictTestFailures({
|
|
83
|
+
historicalData: testResults,
|
|
84
|
+
codeChanges: prDiff,
|
|
85
|
+
teamMetrics: velocityData
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Returns:
|
|
89
|
+
// {
|
|
90
|
+
// probabilityOfFailure: 0.73,
|
|
91
|
+
// likelyFailingTests: ['payment.test.ts', 'checkout.test.ts'],
|
|
92
|
+
// suggestedAction: 'Review payment module changes carefully',
|
|
93
|
+
// confidence: 0.89
|
|
94
|
+
// }
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Executive Reporting
|
|
98
|
+
|
|
99
|
+
**Monthly Quality Report:**
|
|
100
|
+
```markdown
|
|
101
|
+
## Quality Report - October 2025
|
|
102
|
+
|
|
103
|
+
### Executive Summary
|
|
104
|
+
✅ Production: 99.97% uptime (target: 99.95%)
|
|
105
|
+
✅ Deployment: 12x/day (up from 8x/day)
|
|
106
|
+
⚠️ Test Coverage: 82.3% (target: 85%)
|
|
107
|
+
|
|
108
|
+
### Key Achievements
|
|
109
|
+
- Reduced flaky tests from 3.2% to 1.2%
|
|
110
|
+
- Automated 47 new tests (95% automation rate)
|
|
111
|
+
- 0 critical bugs escaped to production
|
|
112
|
+
|
|
113
|
+
### Action Items
|
|
114
|
+
- Increase coverage for new payment module
|
|
115
|
+
- Address 3 long-running flaky tests
|
|
116
|
+
- Train team on performance testing
|
|
117
|
+
|
|
118
|
+
### ROI
|
|
119
|
+
- Automation saves 120 hours/month
|
|
120
|
+
- Bug detection cost: $150/bug vs $5,000 in production
|
|
121
|
+
- Estimated annual savings: $450k
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Related Skills
|
|
125
|
+
|
|
126
|
+
- [quality-metrics](../quality-metrics/)
|
|
127
|
+
- [agentic-quality-engineering](../agentic-quality-engineering/)
|
|
128
|
+
- [continuous-testing-shift-left](../continuous-testing-shift-left/)
|
|
129
|
+
|
|
130
|
+
## Remember
|
|
131
|
+
|
|
132
|
+
**Track metrics to improve quality.**
|
|
133
|
+
|
|
134
|
+
Report:
|
|
135
|
+
- Test results (pass/fail trends)
|
|
136
|
+
- Code coverage (gaps and trends)
|
|
137
|
+
- Flaky test rate (reliability)
|
|
138
|
+
- Defect metrics (escaped bugs)
|
|
139
|
+
- ROI of testing (business value)
|
|
140
|
+
|
|
141
|
+
**Make data actionable, not just visible.**
|
|
142
|
+
|
|
143
|
+
**With Agents:** `qe-quality-analyzer` aggregates metrics, generates insights, predicts trends, and creates executive reports automatically.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-testing-advanced
|
|
3
|
+
description: Advanced visual regression testing with pixel-perfect comparison, AI-powered diff analysis, responsive design validation, and cross-browser visual consistency. Use when detecting UI regressions, validating designs, or ensuring visual consistency.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: specialized-testing
|
|
6
|
+
tags: [visual-testing, visual-regression, pixel-perfect, screenshot-testing, ui-testing]
|
|
7
|
+
difficulty: intermediate
|
|
8
|
+
estimated_time: 60 minutes
|
|
9
|
+
author: agentic-qe
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Advanced Visual Testing
|
|
13
|
+
|
|
14
|
+
## Core Principle
|
|
15
|
+
|
|
16
|
+
**Visual bugs are bugs. Test what users see.**
|
|
17
|
+
|
|
18
|
+
Visual testing catches UI regressions that functional tests miss: layout shifts, color changes, font rendering, alignment issues.
|
|
19
|
+
|
|
20
|
+
## Visual Regression Testing
|
|
21
|
+
|
|
22
|
+
**Process:**
|
|
23
|
+
1. Capture baseline screenshots
|
|
24
|
+
2. Make code changes
|
|
25
|
+
3. Capture new screenshots
|
|
26
|
+
4. Compare pixel-by-pixel
|
|
27
|
+
5. Flag differences for review
|
|
28
|
+
|
|
29
|
+
**With Playwright:**
|
|
30
|
+
```javascript
|
|
31
|
+
import { test, expect } from '@playwright/test';
|
|
32
|
+
|
|
33
|
+
test('homepage visual regression', async ({ page }) => {
|
|
34
|
+
await page.goto('https://example.com');
|
|
35
|
+
|
|
36
|
+
// Capture screenshot
|
|
37
|
+
await expect(page).toHaveScreenshot('homepage.png');
|
|
38
|
+
// First run: saves baseline
|
|
39
|
+
// Subsequent runs: compares to baseline
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('responsive design on mobile', async ({ page }) => {
|
|
43
|
+
await page.setViewportSize({ width: 375, height: 667 }); // iPhone
|
|
44
|
+
|
|
45
|
+
await page.goto('https://example.com');
|
|
46
|
+
await expect(page).toHaveScreenshot('homepage-mobile.png');
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Configuration:**
|
|
51
|
+
```javascript
|
|
52
|
+
// playwright.config.js
|
|
53
|
+
export default {
|
|
54
|
+
expect: {
|
|
55
|
+
toHaveScreenshot: {
|
|
56
|
+
maxDiffPixels: 100, // Allow 100 pixel difference
|
|
57
|
+
threshold: 0.2, // 20% similarity threshold
|
|
58
|
+
animations: 'disabled', // Disable animations
|
|
59
|
+
caret: 'hide' // Hide cursor
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## AI-Powered Visual Testing
|
|
66
|
+
|
|
67
|
+
**Percy (BrowserStack):**
|
|
68
|
+
```javascript
|
|
69
|
+
import percySnapshot from '@percy/playwright';
|
|
70
|
+
|
|
71
|
+
test('homepage visual test', async ({ page }) => {
|
|
72
|
+
await page.goto('https://example.com');
|
|
73
|
+
|
|
74
|
+
// AI-powered comparison (ignores minor anti-aliasing differences)
|
|
75
|
+
await percySnapshot(page, 'Homepage');
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Cross-Browser Visual Testing
|
|
80
|
+
|
|
81
|
+
```javascript
|
|
82
|
+
test.describe('cross-browser visual consistency', () => {
|
|
83
|
+
test('Chrome vs Firefox', async ({ browser }) => {
|
|
84
|
+
const chromePage = await browser.newPage();
|
|
85
|
+
await chromePage.goto('https://example.com');
|
|
86
|
+
const chromeScreenshot = await chromePage.screenshot();
|
|
87
|
+
|
|
88
|
+
// Compare Chrome vs Firefox rendering
|
|
89
|
+
expect(chromeScreenshot).toMatchSnapshot('chrome-homepage.png');
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Dynamic Content Handling
|
|
95
|
+
|
|
96
|
+
**Mask dynamic elements:**
|
|
97
|
+
```javascript
|
|
98
|
+
test('ignore dynamic content', async ({ page }) => {
|
|
99
|
+
await page.goto('https://example.com');
|
|
100
|
+
|
|
101
|
+
await expect(page).toHaveScreenshot({
|
|
102
|
+
mask: [
|
|
103
|
+
page.locator('.timestamp'), // Mask timestamps
|
|
104
|
+
page.locator('.user-count'), // Mask dynamic counters
|
|
105
|
+
page.locator('.advertisement') // Mask ads
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## With qe-visual-tester Agent
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
// Agent performs comprehensive visual testing
|
|
115
|
+
const results = await agent.visualRegressionTest({
|
|
116
|
+
baseline: 'main-branch',
|
|
117
|
+
current: 'feature-branch',
|
|
118
|
+
pages: ['homepage', 'product', 'checkout'],
|
|
119
|
+
devices: ['desktop', 'tablet', 'mobile'],
|
|
120
|
+
browsers: ['chrome', 'firefox', 'safari']
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Returns:
|
|
124
|
+
// {
|
|
125
|
+
// totalPages: 3,
|
|
126
|
+
// totalDevices: 3,
|
|
127
|
+
// totalBrowsers: 3,
|
|
128
|
+
// comparisons: 27, // 3 × 3 × 3
|
|
129
|
+
// differences: 2,
|
|
130
|
+
// report: 'visual-regression-report.html'
|
|
131
|
+
// }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Remember
|
|
135
|
+
|
|
136
|
+
**Functional tests don't catch visual bugs.**
|
|
137
|
+
|
|
138
|
+
Visual regressions include:
|
|
139
|
+
- Layout shifts
|
|
140
|
+
- Color changes
|
|
141
|
+
- Font rendering
|
|
142
|
+
- Alignment issues
|
|
143
|
+
- Missing images
|
|
144
|
+
- Broken CSS
|
|
145
|
+
|
|
146
|
+
**AI-powered tools reduce false positives.**
|
|
147
|
+
|
|
148
|
+
**With Agents:** `qe-visual-tester` automates visual regression across browsers and devices, uses AI to ignore insignificant differences, and generates visual diff reports.
|