🕵 Mobile Visual & Behavioral Testing
Priority: P1 (HIGH)
[!IMPORTANT]
Tier 2 (Methodology): Strategy for cross-platform mobile UI, lifecycle, and device audit.
Tier 3 (Domain): Native iOS, Native Android, Flutter, and React Native platforms.
🧪 Testing Mindset & Layer Fidelity
Analyze diff and select the correct test layer:
- Unit / Widget / Component: In-memory UI/logic tests (RNTL, Compose UI, Flutter Widget). Fast, but NEVER counts as native device verification.
- Native Device E2E: Real binary execution on simulator/device via Appium/XCUITest/UiAutomator/Patrol.
- Answer: 1. What changed? 2. What breaks? 3. Visual & behavioral audit across 10 mobile scope areas.
📋 Ten Mobile Testing Areas
- Functional/UI: Gestures, navigation flows, and synchronization.
- Lifecycle/State: Warm resume, retained recreation (config change) vs real process replacement/relaunch; saved-state reconstruction.
- Device/OS Matrix: Justified matrix (smallest/largest screen, tablet, min supported OS).
- Permissions/Platform: Dual-path (allow/deny/revoke), priming dialogs, deep link routing.
- Offline/Sync: Network loss, optimistic UI, idempotent sync, spec-defined conflict policy.
- Install/Upgrade: Clean install (
fullReset) vs upgrade migration (noReset + DB migration).
- Accessibility/Presentation: VoiceOver/TalkBack, Dynamic Type, Safe Area, soft keyboard.
- Performance/QoS: Cold/warm startup, scroll jank/FPS, ANR/crashes, memory leaks; battery only with an approved objective on a physical device.
- Security/Privacy: Hardware-backed secure storage (Secure Enclave / Keystore / encrypted preferences), logout cleanup, no log PII.
- Release Smoke: SHA-256 build artifact digest, signing context, device ledger, honest BLOCKED reporting.
🛠️ Core Tool Mapping
| Scenario |
Appium Tool / Verification |
| System Alert / Permission |
appium_alert (verify dialog; never auto-dismiss tested prompt) |
| Performance / QoS |
appium_mobile_performance_data (CPU/Mem/FPS during flow) |
| Visual Check |
appium_screenshot (base/diff; mask dynamic tokens) |
| Layout & A11y Audit |
appium_get_page_source (validate hierarchy, labels, safe area) |
| App Lifecycle |
appium_app_lifecycle (background, terminate, activate, deep_link) |
🚫 Anti-Patterns
- Browser/Mock Substitution: Never treat browser viewport emulation or mocks as native device verification.
- Silent Reset Flipping: Never switch from
fullReset to noReset to mask clean-install/migration failures.
- Alert Suppression: Never auto-dismiss or bypass permission dialogs being tested.
- Ignoring QoS: Apps crash/lag under load. MUST check QoS from performance data.
- Blind Tap / Happy-Path Bias: Never ignore empty, loading, error states, or tap without verifying state.
- Single-Device Tunnel Vision: Generalizing one simulator pass to all platforms is forbidden.
📁 Evidence (C6 Alignment)
Record: app artifact SHA-256 digest, build variant, target device/OS, driver rung, and reset mode. .appium-mcp/<session>/ holds <AC|step>-<before|after>.png, <label>.source.xml, perf.json, and video.url. Unavailable hardware/drivers must be reported as BLOCKED (driver: appium).
🔗 References
- Coverage Matrix: mobile-testing-matrix — 10 areas × 4 stacks, expected-outcome sourcing (§0), failure-safe teardown (§12).
- Scenario Details: scenarios — 20 end-to-end mobile procedures.
- Appium MCP: appium-mcp
- Driver Ladder: driver-ladder
1---2name: common-mobile-visual-testing3description: Standardizes mobile UI audits, performance/scroll checks, RTL verification, and state-specific testing on iOS/Android.4metadata:5 source: https://skillmd.com/skills/hoangnguyen0403/common-mobile-visual-testing6 triggers:7 keywords:8 - visual test9 - mobile test10 - verify ui11 - dark mode test12 - accessibility audit13 - behavioral test14 - visual regression15 - localization test16---1718# 🕵 Mobile Visual & Behavioral Testing1920## **Priority: P1 (HIGH)**2122> [!IMPORTANT]23> **Tier 2 (Methodology)**: Strategy for cross-platform mobile UI, lifecycle, and device audit.24> **Tier 3 (Domain)**: Native iOS, Native Android, Flutter, and React Native platforms.2526## 🧪 Testing Mindset & Layer Fidelity2728Analyze diff and select the correct test layer:29- **Unit / Widget / Component**: In-memory UI/logic tests (RNTL, Compose UI, Flutter Widget). Fast, but **NEVER** counts as native device verification.30- **Native Device E2E**: Real binary execution on simulator/device via Appium/XCUITest/UiAutomator/Patrol.31- **Answer**: 1. What changed? 2. What breaks? 3. Visual & behavioral audit across 10 mobile scope areas.3233## 📋 Ten Mobile Testing Areas34351. **Functional/UI**: Gestures, navigation flows, and synchronization.362. **Lifecycle/State**: Warm resume, retained recreation (config change) vs real process replacement/relaunch; saved-state reconstruction.373. **Device/OS Matrix**: Justified matrix (smallest/largest screen, tablet, min supported OS).384. **Permissions/Platform**: Dual-path (allow/deny/revoke), priming dialogs, deep link routing.395. **Offline/Sync**: Network loss, optimistic UI, idempotent sync, spec-defined conflict policy.406. **Install/Upgrade**: Clean install (`fullReset`) vs upgrade migration (`noReset` + DB migration).417. **Accessibility/Presentation**: VoiceOver/TalkBack, Dynamic Type, Safe Area, soft keyboard.428. **Performance/QoS**: Cold/warm startup, scroll jank/FPS, ANR/crashes, memory leaks; battery only with an approved objective on a physical device.439. **Security/Privacy**: Hardware-backed secure storage (Secure Enclave / Keystore / encrypted preferences), logout cleanup, no log PII.4410. **Release Smoke**: SHA-256 build artifact digest, signing context, device ledger, honest BLOCKED reporting.4546## 🛠️ Core Tool Mapping4748| Scenario | Appium Tool / Verification |49| :--- | :--- |50| **System Alert / Permission** | `appium_alert` (verify dialog; never auto-dismiss tested prompt) |51| **Performance / QoS** | `appium_mobile_performance_data` (CPU/Mem/FPS during flow) |52| **Visual Check** | `appium_screenshot` (base/diff; mask dynamic tokens) |53| **Layout & A11y Audit** | `appium_get_page_source` (validate hierarchy, labels, safe area) |54| **App Lifecycle** | `appium_app_lifecycle` (background, terminate, activate, deep_link) |5556## 🚫 Anti-Patterns5758- **Browser/Mock Substitution**: Never treat browser viewport emulation or mocks as native device verification.59- **Silent Reset Flipping**: Never switch from `fullReset` to `noReset` to mask clean-install/migration failures.60- **Alert Suppression**: Never auto-dismiss or bypass permission dialogs being tested.61- **Ignoring QoS**: Apps crash/lag under load. MUST check QoS from performance data.62- **Blind Tap / Happy-Path Bias**: Never ignore empty, loading, error states, or tap without verifying state.63- **Single-Device Tunnel Vision**: Generalizing one simulator pass to all platforms is forbidden.6465## 📁 Evidence (C6 Alignment)6667Record: app artifact SHA-256 digest, build variant, target device/OS, driver rung, and reset mode. `.appium-mcp/<session>/` holds `<AC|step>-<before|after>.png`, `<label>.source.xml`, `perf.json`, and `video.url`. Unavailable hardware/drivers must be reported as `BLOCKED (driver: appium)`.6869## 🔗 References7071- **Coverage Matrix**: [mobile-testing-matrix](references/mobile-testing-matrix.md) — 10 areas × 4 stacks, expected-outcome sourcing (§0), failure-safe teardown (§12).72- **Scenario Details**: [scenarios](references/scenarios.md) — 20 end-to-end mobile procedures.73- **Appium MCP**: [appium-mcp](../../quality-engineering/quality-engineering-appium-mcp/SKILL.md)74- **Driver Ladder**: [driver-ladder](../../quality-engineering/quality-engineering-appium-mcp/references/driver-ladder.md)