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,548 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-testing
|
|
3
|
+
description: Comprehensive mobile testing for iOS and Android platforms including gestures, sensors, permissions, device fragmentation, and performance. Use when testing native apps, hybrid apps, or mobile web, ensuring quality across 1000+ device variants.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: specialized-testing
|
|
6
|
+
tags:
|
|
7
|
+
- mobile-testing
|
|
8
|
+
- ios
|
|
9
|
+
- android
|
|
10
|
+
- appium
|
|
11
|
+
- device-fragmentation
|
|
12
|
+
- mobile-performance
|
|
13
|
+
- gestures
|
|
14
|
+
difficulty: intermediate
|
|
15
|
+
estimated_time: 90-120 minutes
|
|
16
|
+
author: agentic-qe
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Mobile Testing
|
|
20
|
+
|
|
21
|
+
## Core Principle
|
|
22
|
+
|
|
23
|
+
**60%+ of web traffic is mobile. Testing only desktop = ignoring majority of users.**
|
|
24
|
+
|
|
25
|
+
Mobile devices have unique challenges: device fragmentation (1000+ Android devices), platform differences (iOS vs Android), touch gestures, sensors, intermittent networks, and limited resources. Mobile testing ensures quality across this complex landscape.
|
|
26
|
+
|
|
27
|
+
## What is Mobile Testing?
|
|
28
|
+
|
|
29
|
+
**Mobile Testing:** Validating functionality, usability, performance, and security of applications on mobile devices (smartphones, tablets) across multiple platforms, OS versions, and screen sizes.
|
|
30
|
+
|
|
31
|
+
**Why Critical:**
|
|
32
|
+
- 60%+ of global web traffic from mobile
|
|
33
|
+
- 1000+ Android device variants (fragmentation)
|
|
34
|
+
- Platform-specific behaviors (iOS ≠ Android)
|
|
35
|
+
- Mobile-specific interactions (gestures, sensors, permissions)
|
|
36
|
+
- Performance critical (slow networks, limited CPU/memory)
|
|
37
|
+
- App store review requirements
|
|
38
|
+
|
|
39
|
+
**Goal:** Flawless mobile experience across devices, platforms, and conditions.
|
|
40
|
+
|
|
41
|
+
## Mobile App Types
|
|
42
|
+
|
|
43
|
+
### 1. Native Apps
|
|
44
|
+
|
|
45
|
+
**iOS:** Swift/Objective-C, runs only on iOS
|
|
46
|
+
**Android:** Kotlin/Java, runs only on Android
|
|
47
|
+
|
|
48
|
+
**Characteristics:**
|
|
49
|
+
- Best performance
|
|
50
|
+
- Full access to device features
|
|
51
|
+
- Platform-specific UI (UIKit vs Material Design)
|
|
52
|
+
- Separate codebase per platform
|
|
53
|
+
|
|
54
|
+
**Testing Tools:**
|
|
55
|
+
- **iOS:** XCTest, XCUITest, EarlGrey
|
|
56
|
+
- **Android:** Espresso, UI Automator, Robolectric
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 2. Hybrid Apps
|
|
61
|
+
|
|
62
|
+
**Technologies:** React Native, Flutter, Ionic, Cordova
|
|
63
|
+
|
|
64
|
+
**Characteristics:**
|
|
65
|
+
- Single codebase for both platforms
|
|
66
|
+
- JavaScript/Dart + native bridges
|
|
67
|
+
- Good performance (near-native)
|
|
68
|
+
- Shared business logic, platform-specific UI
|
|
69
|
+
|
|
70
|
+
**Testing Tools:**
|
|
71
|
+
- Appium (cross-platform)
|
|
72
|
+
- Detox (React Native)
|
|
73
|
+
- Flutter Driver (Flutter)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### 3. Mobile Web
|
|
78
|
+
|
|
79
|
+
**PWAs, responsive websites in mobile browsers**
|
|
80
|
+
|
|
81
|
+
**Characteristics:**
|
|
82
|
+
- No app store submission
|
|
83
|
+
- Universal access via URL
|
|
84
|
+
- Limited device feature access
|
|
85
|
+
- Responsive design critical
|
|
86
|
+
|
|
87
|
+
**Testing Tools:**
|
|
88
|
+
- Playwright Mobile
|
|
89
|
+
- BrowserStack, Sauce Labs
|
|
90
|
+
- Chrome DevTools (mobile emulation)
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## iOS vs Android Differences
|
|
95
|
+
|
|
96
|
+
### Key Differences
|
|
97
|
+
|
|
98
|
+
| Aspect | iOS | Android |
|
|
99
|
+
|--------|-----|---------|
|
|
100
|
+
| **OS Versions** | 2-3 supported (high adoption) | 10+ in use (fragmentation) |
|
|
101
|
+
| **Devices** | ~40 iPhone/iPad models | 1000+ manufacturers |
|
|
102
|
+
| **Screen Sizes** | Predictable set | Vast variety |
|
|
103
|
+
| **UI Guidelines** | Human Interface Guidelines | Material Design |
|
|
104
|
+
| **Permissions** | Single prompt system | Granular runtime permissions |
|
|
105
|
+
| **Back Button** | Swipe/nav button | Hardware/software back button |
|
|
106
|
+
| **App Distribution** | App Store (strict review) | Google Play + sideloading |
|
|
107
|
+
| **Testing Tools** | XCUITest (native) | Espresso (native) |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Mobile-Specific Testing
|
|
112
|
+
|
|
113
|
+
### 1. Touch Gestures
|
|
114
|
+
|
|
115
|
+
**Gesture Types:**
|
|
116
|
+
```
|
|
117
|
+
Tap → Single touch
|
|
118
|
+
Double Tap → Quick two taps
|
|
119
|
+
Long Press → Touch and hold (context menu)
|
|
120
|
+
Swipe → Slide finger (scroll, swipe between screens)
|
|
121
|
+
Pinch → Two fingers move apart (zoom in)
|
|
122
|
+
Zoom Out → Two fingers move together (zoom out)
|
|
123
|
+
Rotate → Two fingers rotate
|
|
124
|
+
Multi-Touch → Multiple simultaneous touches
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Testing with Appium:**
|
|
128
|
+
```javascript
|
|
129
|
+
// Tap
|
|
130
|
+
await driver.touchAction({
|
|
131
|
+
action: 'tap',
|
|
132
|
+
x: 100,
|
|
133
|
+
y: 200
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Swipe (scroll down)
|
|
137
|
+
await driver.touchAction([
|
|
138
|
+
{ action: 'press', x: 200, y: 400 },
|
|
139
|
+
{ action: 'moveTo', x: 200, y: 100 },
|
|
140
|
+
{ action: 'release' }
|
|
141
|
+
]);
|
|
142
|
+
|
|
143
|
+
// Pinch to zoom
|
|
144
|
+
const finger1 = [
|
|
145
|
+
{ action: 'press', x: 100, y: 200 },
|
|
146
|
+
{ action: 'moveTo', x: 50, y: 150 },
|
|
147
|
+
{ action: 'release' }
|
|
148
|
+
];
|
|
149
|
+
const finger2 = [
|
|
150
|
+
{ action: 'press', x: 200, y: 200 },
|
|
151
|
+
{ action: 'moveTo', x: 250, y: 250 },
|
|
152
|
+
{ action: 'release' }
|
|
153
|
+
];
|
|
154
|
+
await driver.multiTouchAction([finger1, finger2]);
|
|
155
|
+
|
|
156
|
+
// Long press
|
|
157
|
+
await driver.touchAction({
|
|
158
|
+
action: 'longPress',
|
|
159
|
+
x: 100,
|
|
160
|
+
y: 200,
|
|
161
|
+
duration: 2000 // 2 seconds
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### 2. Sensors Testing
|
|
168
|
+
|
|
169
|
+
**Device Sensors:**
|
|
170
|
+
- **GPS/Location:** Location services
|
|
171
|
+
- **Camera:** Photo/video capture
|
|
172
|
+
- **Microphone:** Audio recording
|
|
173
|
+
- **Accelerometer:** Device tilt/shake
|
|
174
|
+
- **Gyroscope:** Rotation detection
|
|
175
|
+
- **Proximity:** Screen off when near face
|
|
176
|
+
- **Ambient Light:** Brightness auto-adjust
|
|
177
|
+
|
|
178
|
+
**Testing Location:**
|
|
179
|
+
```javascript
|
|
180
|
+
// Set GPS location
|
|
181
|
+
await driver.setGeoLocation({
|
|
182
|
+
latitude: 37.7749,
|
|
183
|
+
longitude: -122.4194,
|
|
184
|
+
altitude: 0
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// Test location-based feature
|
|
188
|
+
const nearbyStores = await findElement('stores-list');
|
|
189
|
+
expect(nearbyStores.getText()).toContain('San Francisco');
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Testing Camera/Gallery:**
|
|
193
|
+
```javascript
|
|
194
|
+
// iOS: Push image to simulator
|
|
195
|
+
await driver.pushFile('/path/on/device/image.jpg', imageBase64);
|
|
196
|
+
|
|
197
|
+
// Android: Set location for gallery
|
|
198
|
+
await driver.execute('mobile: shell', {
|
|
199
|
+
command: 'am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///path'
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// Trigger camera/gallery picker
|
|
203
|
+
await driver.findElement('upload-photo-button').click();
|
|
204
|
+
|
|
205
|
+
// Verify image uploaded
|
|
206
|
+
expect(await driver.findElement('uploaded-image')).toBeDefined();
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### 3. Permissions Testing
|
|
212
|
+
|
|
213
|
+
**iOS Permissions Flow:**
|
|
214
|
+
```javascript
|
|
215
|
+
// Request permission (iOS shows system alert)
|
|
216
|
+
await driver.findElement('enable-location').click();
|
|
217
|
+
|
|
218
|
+
// Handle iOS permission alert
|
|
219
|
+
const alert = await driver.getAlert();
|
|
220
|
+
expect(alert.getText()).toContain('allow location');
|
|
221
|
+
await alert.accept(); // or alert.dismiss()
|
|
222
|
+
|
|
223
|
+
// Verify permission granted
|
|
224
|
+
const locationEnabled = await driver.findElement('location-status');
|
|
225
|
+
expect(locationEnabled.getText()).toBe('Enabled');
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Android Runtime Permissions:**
|
|
229
|
+
```javascript
|
|
230
|
+
// Grant permission before test (Android)
|
|
231
|
+
await driver.execute('mobile: shell', {
|
|
232
|
+
command: 'pm grant com.example.app android.permission.CAMERA'
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
// Or handle permission dialog during test
|
|
236
|
+
await driver.findElement('take-photo').click();
|
|
237
|
+
|
|
238
|
+
// Wait for permission dialog
|
|
239
|
+
const permissionDialog = await driver.waitForElement('com.android.packageinstaller:id/permission_message');
|
|
240
|
+
await driver.findElement('com.android.packageinstaller:id/permission_allow_button').click();
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
### 4. Network Conditions
|
|
246
|
+
|
|
247
|
+
**Test on Poor Networks:**
|
|
248
|
+
```javascript
|
|
249
|
+
// Simulate 3G network
|
|
250
|
+
await driver.setNetworkConnection(4); // 3G
|
|
251
|
+
|
|
252
|
+
// Test app behavior
|
|
253
|
+
await driver.findElement('load-content').click();
|
|
254
|
+
|
|
255
|
+
const loadingIndicator = await driver.waitForElement('spinner', 5000);
|
|
256
|
+
expect(loadingIndicator).toBeDefined();
|
|
257
|
+
|
|
258
|
+
// Restore full network
|
|
259
|
+
await driver.setNetworkConnection(6); // WiFi + Data
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Offline Mode Testing:**
|
|
263
|
+
```javascript
|
|
264
|
+
// Disable network
|
|
265
|
+
await driver.toggleAirplaneMode();
|
|
266
|
+
|
|
267
|
+
// Test offline functionality
|
|
268
|
+
await driver.findElement('view-saved-items').click();
|
|
269
|
+
const items = await driver.findElements('saved-item');
|
|
270
|
+
expect(items.length).toBeGreaterThan(0);
|
|
271
|
+
|
|
272
|
+
// Verify offline banner
|
|
273
|
+
const banner = await driver.findElement('offline-banner');
|
|
274
|
+
expect(banner.getText()).toContain('No internet connection');
|
|
275
|
+
|
|
276
|
+
// Re-enable network
|
|
277
|
+
await driver.toggleAirplaneMode();
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Device Fragmentation Strategy
|
|
283
|
+
|
|
284
|
+
### Real Devices vs Emulators
|
|
285
|
+
|
|
286
|
+
**Emulators/Simulators:**
|
|
287
|
+
- **Pros:** Fast, free, easy to automate, unlimited devices
|
|
288
|
+
- **Cons:** Not 100% accurate, no real sensors, different performance
|
|
289
|
+
|
|
290
|
+
**Real Devices:**
|
|
291
|
+
- **Pros:** Accurate, real sensors, actual performance, real network
|
|
292
|
+
- **Cons:** Expensive, harder to maintain, slower
|
|
293
|
+
|
|
294
|
+
**Strategy:** Use emulators for fast feedback, real devices for critical paths
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### Device Coverage Matrix
|
|
299
|
+
|
|
300
|
+
**Priority Tiers:**
|
|
301
|
+
|
|
302
|
+
**Tier 1 (Must Test):**
|
|
303
|
+
- Latest iPhone (iOS current version)
|
|
304
|
+
- Latest Samsung Galaxy (Android current version)
|
|
305
|
+
- iPad (latest)
|
|
306
|
+
- ~60% of user base
|
|
307
|
+
|
|
308
|
+
**Tier 2 (Should Test):**
|
|
309
|
+
- iPhone N-1, N-2 (previous 2 generations)
|
|
310
|
+
- Samsung Galaxy N-1, N-2
|
|
311
|
+
- Google Pixel (latest)
|
|
312
|
+
- One popular low-end Android
|
|
313
|
+
- ~30% of user base
|
|
314
|
+
|
|
315
|
+
**Tier 3 (Nice to Test):**
|
|
316
|
+
- Older devices (N-3, N-4)
|
|
317
|
+
- Various manufacturers (Xiaomi, OnePlus, etc.)
|
|
318
|
+
- Tablets
|
|
319
|
+
- ~10% of user base
|
|
320
|
+
|
|
321
|
+
**Example Matrix:**
|
|
322
|
+
```
|
|
323
|
+
Device | OS Version | Screen Size | Priority
|
|
324
|
+
-----------------------|------------|-------------|----------
|
|
325
|
+
iPhone 15 Pro | iOS 17 | 6.1" | Tier 1
|
|
326
|
+
iPhone 14 | iOS 16 | 6.1" | Tier 2
|
|
327
|
+
iPhone 13 | iOS 15 | 6.1" | Tier 2
|
|
328
|
+
iPad Pro | iOS 17 | 12.9" | Tier 1
|
|
329
|
+
Samsung Galaxy S24 | Android 14 | 6.2" | Tier 1
|
|
330
|
+
Samsung Galaxy S23 | Android 13 | 6.1" | Tier 2
|
|
331
|
+
Google Pixel 8 | Android 14 | 6.2" | Tier 2
|
|
332
|
+
Xiaomi Redmi Note 12 | Android 13 | 6.67" | Tier 3
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Mobile Automation with Appium
|
|
338
|
+
|
|
339
|
+
### Setup
|
|
340
|
+
|
|
341
|
+
**Install Appium:**
|
|
342
|
+
```bash
|
|
343
|
+
npm install -g appium
|
|
344
|
+
appium driver install xcuitest # iOS
|
|
345
|
+
appium driver install uiautomator2 # Android
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
**Capabilities (iOS):**
|
|
349
|
+
```javascript
|
|
350
|
+
const caps = {
|
|
351
|
+
platformName: 'iOS',
|
|
352
|
+
'appium:platformVersion': '17.0',
|
|
353
|
+
'appium:deviceName': 'iPhone 15',
|
|
354
|
+
'appium:automationName': 'XCUITest',
|
|
355
|
+
'appium:app': '/path/to/app.ipa',
|
|
356
|
+
'appium:noReset': true,
|
|
357
|
+
'appium:fullReset': false
|
|
358
|
+
};
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Capabilities (Android):**
|
|
362
|
+
```javascript
|
|
363
|
+
const caps = {
|
|
364
|
+
platformName: 'Android',
|
|
365
|
+
'appium:platformVersion': '14',
|
|
366
|
+
'appium:deviceName': 'Pixel 8',
|
|
367
|
+
'appium:automationName': 'UiAutomator2',
|
|
368
|
+
'appium:app': '/path/to/app.apk',
|
|
369
|
+
'appium:appPackage': 'com.example.app',
|
|
370
|
+
'appium:appActivity': '.MainActivity'
|
|
371
|
+
};
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
### Cross-Platform Tests
|
|
377
|
+
|
|
378
|
+
**Page Object Pattern:**
|
|
379
|
+
```javascript
|
|
380
|
+
class LoginPage {
|
|
381
|
+
get emailInput() {
|
|
382
|
+
return platform === 'iOS'
|
|
383
|
+
? $('~email-input') // accessibility id
|
|
384
|
+
: $('android=new UiSelector().resourceId("email")');
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
get passwordInput() {
|
|
388
|
+
return platform === 'iOS'
|
|
389
|
+
? $('~password-input')
|
|
390
|
+
: $('android=new UiSelector().resourceId("password")');
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
get loginButton() {
|
|
394
|
+
return platform === 'iOS'
|
|
395
|
+
? $('~login-button')
|
|
396
|
+
: $('android=new UiSelector().text("Login")');
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
async login(email, password) {
|
|
400
|
+
await this.emailInput.setValue(email);
|
|
401
|
+
await this.passwordInput.setValue(password);
|
|
402
|
+
await this.loginButton.click();
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Use in tests
|
|
407
|
+
test('user can login', async () => {
|
|
408
|
+
const loginPage = new LoginPage();
|
|
409
|
+
await loginPage.login('test@example.com', 'password123');
|
|
410
|
+
|
|
411
|
+
expect(await dashboardPage.isDisplayed()).toBe(true);
|
|
412
|
+
});
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Mobile Performance Testing
|
|
418
|
+
|
|
419
|
+
### Key Metrics
|
|
420
|
+
|
|
421
|
+
**Performance Goals:**
|
|
422
|
+
- **App Launch:** < 2 seconds
|
|
423
|
+
- **Screen Transition:** < 300ms
|
|
424
|
+
- **Network Request:** < 1 second
|
|
425
|
+
- **Frame Rate:** 60 FPS (no jank)
|
|
426
|
+
- **Battery Drain:** < 5%/hour (background)
|
|
427
|
+
- **Memory Usage:** < 150MB (typical app)
|
|
428
|
+
|
|
429
|
+
**Measuring with Appium:**
|
|
430
|
+
```javascript
|
|
431
|
+
// Get performance data
|
|
432
|
+
const perfData = await driver.getPerformanceData('com.example.app', 'cpuinfo', 5);
|
|
433
|
+
console.log('CPU Usage:', perfData);
|
|
434
|
+
|
|
435
|
+
const memData = await driver.getPerformanceData('com.example.app', 'memoryinfo', 5);
|
|
436
|
+
console.log('Memory Usage:', memData);
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**iOS Instruments:**
|
|
440
|
+
```bash
|
|
441
|
+
# Measure launch time
|
|
442
|
+
instruments -t "Time Profiler" -D trace.trace -w "iPhone 15" MyApp.app
|
|
443
|
+
|
|
444
|
+
# Measure memory
|
|
445
|
+
instruments -t "Allocations" -D memory.trace -w "iPhone 15" MyApp.app
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**Android Profiler:**
|
|
449
|
+
```bash
|
|
450
|
+
# Measure CPU
|
|
451
|
+
adb shell dumpsys cpuinfo | grep com.example.app
|
|
452
|
+
|
|
453
|
+
# Measure memory
|
|
454
|
+
adb shell dumpsys meminfo com.example.app
|
|
455
|
+
|
|
456
|
+
# Measure battery
|
|
457
|
+
adb shell dumpsys batterystats --reset
|
|
458
|
+
# Use app for 1 hour
|
|
459
|
+
adb shell dumpsys batterystats com.example.app
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Using with QE Agents
|
|
465
|
+
|
|
466
|
+
### qe-mobile-tester: Intelligent Cross-Platform Testing
|
|
467
|
+
|
|
468
|
+
```typescript
|
|
469
|
+
// Agent orchestrates mobile testing across devices
|
|
470
|
+
const results = await agent.executeMobileTests({
|
|
471
|
+
platforms: ['iOS', 'Android'],
|
|
472
|
+
deviceTiers: [1, 2], // Tier 1 and 2 devices
|
|
473
|
+
tests: 'regression-suite',
|
|
474
|
+
parallelDevices: 5
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// Returns:
|
|
478
|
+
// {
|
|
479
|
+
// iOS: {
|
|
480
|
+
// iPhone15: { passed: 47, failed: 0 },
|
|
481
|
+
// iPhone14: { passed: 46, failed: 1 }
|
|
482
|
+
// },
|
|
483
|
+
// Android: {
|
|
484
|
+
// GalaxyS24: { passed: 45, failed: 2 },
|
|
485
|
+
// Pixel8: { passed: 47, failed: 0 }
|
|
486
|
+
// },
|
|
487
|
+
// totalTime: '15 minutes',
|
|
488
|
+
// deviceFarmCost: '$8.50'
|
|
489
|
+
// }
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### Device Farm Integration
|
|
493
|
+
|
|
494
|
+
```typescript
|
|
495
|
+
// Agent connects to BrowserStack/Sauce Labs
|
|
496
|
+
await agent.runOnDeviceFarm({
|
|
497
|
+
service: 'browserstack',
|
|
498
|
+
devices: [
|
|
499
|
+
'iPhone 15 - iOS 17',
|
|
500
|
+
'Samsung Galaxy S24 - Android 14',
|
|
501
|
+
'iPad Pro - iOS 17'
|
|
502
|
+
],
|
|
503
|
+
tests: 'smoke-suite',
|
|
504
|
+
recordVideo: true,
|
|
505
|
+
captureNetworkLogs: true
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
// Automatically distributes tests across devices
|
|
509
|
+
// Captures screenshots, videos, logs
|
|
510
|
+
// Generates consolidated report
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## Related Skills
|
|
516
|
+
|
|
517
|
+
**Core Testing:**
|
|
518
|
+
- [agentic-quality-engineering](../agentic-quality-engineering/) - Mobile testing agents
|
|
519
|
+
- [regression-testing](../regression-testing/) - Mobile regression
|
|
520
|
+
- [performance-testing](../performance-testing/) - Mobile performance
|
|
521
|
+
|
|
522
|
+
**Specialized:**
|
|
523
|
+
- [accessibility-testing](../accessibility-testing/) - Mobile a11y (VoiceOver, TalkBack)
|
|
524
|
+
- [security-testing](../security-testing/) - Mobile security
|
|
525
|
+
- [compatibility-testing](../compatibility-testing/) - Device compatibility
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Remember
|
|
530
|
+
|
|
531
|
+
**Mobile is not a smaller desktop - it's a different platform.**
|
|
532
|
+
|
|
533
|
+
Unique challenges:
|
|
534
|
+
- Device fragmentation (1000+ devices)
|
|
535
|
+
- Touch gestures, not mouse clicks
|
|
536
|
+
- Sensors, permissions, offline scenarios
|
|
537
|
+
- Intermittent networks, battery constraints
|
|
538
|
+
- Platform differences (iOS ≠ Android)
|
|
539
|
+
|
|
540
|
+
**Test on real devices for critical flows.**
|
|
541
|
+
|
|
542
|
+
Emulators catch 80% of bugs, but real devices are essential for:
|
|
543
|
+
- Actual performance
|
|
544
|
+
- Real sensor behavior
|
|
545
|
+
- Network reliability
|
|
546
|
+
- Platform-specific quirks
|
|
547
|
+
|
|
548
|
+
**With Agents:** `qe-mobile-tester` orchestrates testing across device farms, manages platform differences, and provides comprehensive mobile testing at scale. Use agents to test 10+ devices in parallel and reduce mobile testing time from days to hours.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mutation-testing
|
|
3
|
+
description: Test quality validation through mutation testing, assessing test suite effectiveness by introducing code mutations and measuring kill rate. Use when evaluating test quality, identifying weak tests, or proving tests actually catch bugs.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: testing-methodologies
|
|
6
|
+
tags: [mutation-testing, test-quality, mutation-score, stryker, test-effectiveness]
|
|
7
|
+
difficulty: advanced
|
|
8
|
+
estimated_time: 60 minutes
|
|
9
|
+
author: agentic-qe
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Mutation Testing
|
|
13
|
+
|
|
14
|
+
## Core Principle
|
|
15
|
+
|
|
16
|
+
**Tests test code. But who tests the tests?**
|
|
17
|
+
|
|
18
|
+
Mutation testing validates test quality by introducing small code changes (mutations) and verifying tests catch them. High mutation score = effective tests.
|
|
19
|
+
|
|
20
|
+
## What is Mutation Testing?
|
|
21
|
+
|
|
22
|
+
**Process:**
|
|
23
|
+
1. Mutate code (change + to -, < to <=, remove if statements)
|
|
24
|
+
2. Run tests against mutated code
|
|
25
|
+
3. If tests fail → Mutation "killed" ✅ (good)
|
|
26
|
+
4. If tests pass → Mutation "survived" ❌ (weak tests)
|
|
27
|
+
|
|
28
|
+
**Mutation Score = Killed / (Killed + Survived)**
|
|
29
|
+
|
|
30
|
+
**Example:**
|
|
31
|
+
```javascript
|
|
32
|
+
// Original code
|
|
33
|
+
function isAdult(age) {
|
|
34
|
+
return age >= 18; // ← Mutation: Change >= to >
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Test
|
|
38
|
+
test('18 is adult', () => {
|
|
39
|
+
expect(isAdult(18)).toBe(true); // Catches mutation!
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**If test was weak:**
|
|
44
|
+
```javascript
|
|
45
|
+
test('19 is adult', () => {
|
|
46
|
+
expect(isAdult(19)).toBe(true); // Doesn't catch >= vs >
|
|
47
|
+
});
|
|
48
|
+
// Mutation survives → Test needs improvement
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Mutation Operators
|
|
52
|
+
|
|
53
|
+
**Arithmetic:** `+ → -`, `* → /`
|
|
54
|
+
**Relational:** `< → <=`, `== → !=`
|
|
55
|
+
**Logical:** `&& → ||`, `! removed`
|
|
56
|
+
**Conditional:** `if (x) → if (true)`, `if (x) → if (false)`
|
|
57
|
+
**Statement:** Remove return, remove function call
|
|
58
|
+
|
|
59
|
+
## Using Stryker
|
|
60
|
+
|
|
61
|
+
**Install:**
|
|
62
|
+
```bash
|
|
63
|
+
npm install --save-dev @stryker-mutator/core @stryker-mutator/jest-runner
|
|
64
|
+
npx stryker init
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Configuration:**
|
|
68
|
+
```javascript
|
|
69
|
+
// stryker.conf.json
|
|
70
|
+
{
|
|
71
|
+
"packageManager": "npm",
|
|
72
|
+
"reporters": ["html", "clear-text", "progress"],
|
|
73
|
+
"testRunner": "jest",
|
|
74
|
+
"coverageAnalysis": "perTest",
|
|
75
|
+
"mutate": [
|
|
76
|
+
"src/**/*.ts",
|
|
77
|
+
"!src/**/*.spec.ts"
|
|
78
|
+
],
|
|
79
|
+
"thresholds": {
|
|
80
|
+
"high": 90,
|
|
81
|
+
"low": 70,
|
|
82
|
+
"break": 60
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Run:**
|
|
88
|
+
```bash
|
|
89
|
+
npx stryker run
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Output:**
|
|
93
|
+
```
|
|
94
|
+
Mutation Score: 87.3%
|
|
95
|
+
Killed: 124
|
|
96
|
+
Survived: 18
|
|
97
|
+
No Coverage: 3
|
|
98
|
+
Timeout: 1
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## With Agents
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
// qe-test-generator uses mutation testing
|
|
105
|
+
const mutationAnalysis = await agent.analyzeMutations({
|
|
106
|
+
targetFile: 'src/payment.ts',
|
|
107
|
+
generateMissingTests: true
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Returns:
|
|
111
|
+
// {
|
|
112
|
+
// mutationScore: 0.65,
|
|
113
|
+
// survivedMutations: [
|
|
114
|
+
// { line: 45, operator: '>=', mutant: '>', killedBy: null }
|
|
115
|
+
// ],
|
|
116
|
+
// generatedTests: [
|
|
117
|
+
// 'test for boundary at line 45'
|
|
118
|
+
// ]
|
|
119
|
+
// }
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Remember
|
|
123
|
+
|
|
124
|
+
**High code coverage ≠ good tests**
|
|
125
|
+
|
|
126
|
+
- 100% coverage but weak assertions = useless
|
|
127
|
+
- Mutation testing proves tests work
|
|
128
|
+
|
|
129
|
+
**With Agents:** Mutation testing handler automatically runs mutations, identifies weak tests, and generates missing test cases to kill surviving mutations.
|