Mobile Testing
Quick Mobile Checklist:
- Test on latest iOS + Android flagship devices
- Test offline mode and network transitions
- Verify push notifications work
- Test gesture interactions (swipe, pinch)
- Check permissions flow (camera, location, notifications)
Critical Success Factors:
- Emulators for 80% of testing, real devices for 20% critical paths
- Test on devices your users actually use (analytics)
- Device fragmentation is Android's biggest challenge
Quick Reference Card
When to Use
- Native app development (iOS/Android)
- Hybrid apps (React Native, Flutter)
- Mobile web / PWAs
- App store submission preparation
iOS vs Android Differences
| Aspect |
iOS |
Android |
| OS Versions |
2-3 supported |
10+ in use |
| Devices |
~40 models |
1000+ variants |
| Back Button |
Gesture/nav |
Hardware/software |
| Permissions |
Single prompt |
Runtime granular |
| App Store |
Strict review |
Google Play + sideload |
Device Coverage Tiers
| Tier |
Coverage |
Devices |
| Tier 1 |
60% users |
iPhone 15, Galaxy S24, iPad |
| Tier 2 |
30% users |
iPhone 14/13, Pixel 8 |
| Tier 3 |
10% users |
Older devices, other manufacturers |
Mobile Performance Goals
| Metric |
Target |
| App launch |
< 2 seconds |
| Screen transition |
< 300ms |
| Frame rate |
60 FPS |
| Battery drain |
< 5%/hour background |
Touch Gesture Testing
// Appium gesture examples
// Tap
await driver.touchAction({ action: 'tap', x: 100, y: 200 });
// Swipe (scroll down)
await driver.touchAction([
{ action: 'press', x: 200, y: 400 },
{ action: 'moveTo', x: 200, y: 100 },
{ action: 'release' }
]);
// Pinch to zoom
const finger1 = [
{ action: 'press', x: 100, y: 200 },
{ action: 'moveTo', x: 50, y: 150 },
{ action: 'release' }
];
const finger2 = [
{ action: 'press', x: 200, y: 200 },
{ action: 'moveTo', x: 250, y: 250 },
{ action: 'release' }
];
await driver.multiTouchAction([finger1, finger2]);
// Long press
await driver.touchAction({
action: 'longPress',
x: 100, y: 200,
duration: 2000
});
Mobile-Specific Scenarios
// Offline mode testing
test('app works offline', async () => {
await driver.toggleAirplaneMode();
await driver.findElement('view-saved-items').click();
const items = await driver.findElements('saved-item');
expect(items.length).toBeGreaterThan(0);
const banner = await driver.findElement('offline-banner');
expect(banner.getText()).toContain('No internet');
await driver.toggleAirplaneMode(); // Restore
});
// Location testing
test('location-based features', async () => {
await driver.setGeoLocation({
latitude: 37.7749,
longitude: -122.4194,
altitude: 0
});
const stores = await driver.findElement('stores-list');
expect(stores.getText()).toContain('San Francisco');
});
// Permission testing (Android)
test('camera permission flow', async () => {
await driver.findElement('take-photo').click();
// Handle permission dialog
await driver.findElement(
'com.android.packageinstaller:id/permission_allow_button'
).click();
expect(await driver.findElement('camera-view')).toBeDefined();
});
Agent-Driven Mobile Testing
// Cross-platform mobile testing
await Task("Mobile Test Suite", {
platforms: ['iOS', 'Android'],
deviceTiers: [1, 2],
tests: 'regression-suite',
parallelDevices: 5,
deviceFarm: 'browserstack'
}, "qe-test-executor");
// Device farm integration
await Task("Device Farm Execution", {
service: 'browserstack',
devices: [
'iPhone 15 - iOS 17',
'Samsung Galaxy S24 - Android 14'
],
recordVideo: true,
captureNetworkLogs: true
}, "qe-test-executor");
Agent Coordination Hints
Memory Namespace
aqe/mobile-testing/
├── device-matrix/* - Device coverage strategy
├── platform-tests/* - iOS/Android specific tests
├── gesture-library/* - Reusable gesture patterns
└── performance/* - Mobile performance metrics
Fleet Coordination
const mobileFleet = await FleetManager.coordinate({
strategy: 'mobile-testing',
agents: [
'qe-test-executor', // Cross-platform execution
'qe-performance-tester', // Mobile performance
'qe-visual-tester' // Screen size validation
],
topology: 'parallel'
});
Related Skills
Remember
Mobile is not a smaller desktop - it's a different platform. 60%+ of web traffic is mobile. Device fragmentation (1000+ Android devices), touch gestures, sensors, permissions, offline scenarios - all require specific testing.
Test on real devices for critical flows. Emulators catch 80% of bugs but real devices needed for actual performance, sensor behavior, and platform quirks.
With Agents: qe-test-executor orchestrates testing across device farms, manages platform differences, and tests 10+ devices in parallel. Reduces mobile testing from days to hours.
1---
2inclusion: auto
3name: qe-mobile-testing
4description: "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."
5tags: [mobile, ios, android, appium, gestures, device-fragmentation, sensors]
6---
7
8# Mobile Testing
9
10<default_to_action>
11When testing mobile applications:
121. DEFINE device coverage matrix (Tier 1: 60%, Tier 2: 30%, Tier 3: 10%)
132. TEST platform differences (iOS ≠ Android: back button, permissions, UI)
143. VALIDATE touch gestures (tap, swipe, pinch, long-press)
154. TEST mobile-specific scenarios (offline, low battery, interruptions)
165. USE real devices for critical paths, emulators for fast feedback
17
18**Quick Mobile Checklist:**
19- Test on latest iOS + Android flagship devices
20- Test offline mode and network transitions
21- Verify push notifications work
22- Test gesture interactions (swipe, pinch)
23- Check permissions flow (camera, location, notifications)
24
25**Critical Success Factors:**
26- Emulators for 80% of testing, real devices for 20% critical paths
27- Test on devices your users actually use (analytics)
28- Device fragmentation is Android's biggest challenge
29</default_to_action>
30
31## Quick Reference Card
32
33### When to Use
34- Native app development (iOS/Android)
35- Hybrid apps (React Native, Flutter)
36- Mobile web / PWAs
37- App store submission preparation
38
39### iOS vs Android Differences
40| Aspect | iOS | Android |
41|--------|-----|---------|
42| OS Versions | 2-3 supported | 10+ in use |
43| Devices | ~40 models | 1000+ variants |
44| Back Button | Gesture/nav | Hardware/software |
45| Permissions | Single prompt | Runtime granular |
46| App Store | Strict review | Google Play + sideload |
47
48### Device Coverage Tiers
49| Tier | Coverage | Devices |
50|------|----------|---------|
51| **Tier 1** | 60% users | iPhone 15, Galaxy S24, iPad |
52| **Tier 2** | 30% users | iPhone 14/13, Pixel 8 |
53| **Tier 3** | 10% users | Older devices, other manufacturers |
54
55### Mobile Performance Goals
56| Metric | Target |
57|--------|--------|
58| App launch | < 2 seconds |
59| Screen transition | < 300ms |
60| Frame rate | 60 FPS |
61| Battery drain | < 5%/hour background |
62
63---
64
65## Touch Gesture Testing
66
67```javascript
68// Appium gesture examples
69// Tap
70await driver.touchAction({ action: 'tap', x: 100, y: 200 });
71
72// Swipe (scroll down)
73await driver.touchAction([
74 { action: 'press', x: 200, y: 400 },
75 { action: 'moveTo', x: 200, y: 100 },
76 { action: 'release' }
77]);
78
79// Pinch to zoom
80const finger1 = [
81 { action: 'press', x: 100, y: 200 },
82 { action: 'moveTo', x: 50, y: 150 },
83 { action: 'release' }
84];
85const finger2 = [
86 { action: 'press', x: 200, y: 200 },
87 { action: 'moveTo', x: 250, y: 250 },
88 { action: 'release' }
89];
90await driver.multiTouchAction([finger1, finger2]);
91
92// Long press
93await driver.touchAction({
94 action: 'longPress',
95 x: 100, y: 200,
96 duration: 2000
97});
98```
99
100---
101
102## Mobile-Specific Scenarios
103
104```javascript
105// Offline mode testing
106test('app works offline', async () => {
107 await driver.toggleAirplaneMode();
108
109 await driver.findElement('view-saved-items').click();
110 const items = await driver.findElements('saved-item');
111 expect(items.length).toBeGreaterThan(0);
112
113 const banner = await driver.findElement('offline-banner');
114 expect(banner.getText()).toContain('No internet');
115
116 await driver.toggleAirplaneMode(); // Restore
117});
118
119// Location testing
120test('location-based features', async () => {
121 await driver.setGeoLocation({
122 latitude: 37.7749,
123 longitude: -122.4194,
124 altitude: 0
125 });
126
127 const stores = await driver.findElement('stores-list');
128 expect(stores.getText()).toContain('San Francisco');
129});
130
131// Permission testing (Android)
132test('camera permission flow', async () => {
133 await driver.findElement('take-photo').click();
134
135 // Handle permission dialog
136 await driver.findElement(
137 'com.android.packageinstaller:id/permission_allow_button'
138 ).click();
139
140 expect(await driver.findElement('camera-view')).toBeDefined();
141});
142```
143
144---
145
146## Agent-Driven Mobile Testing
147
148```typescript
149// Cross-platform mobile testing
150await Task("Mobile Test Suite", {
151 platforms: ['iOS', 'Android'],
152 deviceTiers: [1, 2],
153 tests: 'regression-suite',
154 parallelDevices: 5,
155 deviceFarm: 'browserstack'
156}, "qe-test-executor");
157
158// Device farm integration
159await Task("Device Farm Execution", {
160 service: 'browserstack',
161 devices: [
162 'iPhone 15 - iOS 17',
163 'Samsung Galaxy S24 - Android 14'
164 ],
165 recordVideo: true,
166 captureNetworkLogs: true
167}, "qe-test-executor");
168```
169
170---
171
172## Agent Coordination Hints
173
174### Memory Namespace
175```
176aqe/mobile-testing/
177├── device-matrix/* - Device coverage strategy
178├── platform-tests/* - iOS/Android specific tests
179├── gesture-library/* - Reusable gesture patterns
180└── performance/* - Mobile performance metrics
181```
182
183### Fleet Coordination
184```typescript
185const mobileFleet = await FleetManager.coordinate({
186 strategy: 'mobile-testing',
187 agents: [
188 'qe-test-executor', // Cross-platform execution
189 'qe-performance-tester', // Mobile performance
190 'qe-visual-tester' // Screen size validation
191 ],
192 topology: 'parallel'
193});
194```
195
196---
197
198## Related Skills
199- [accessibility-testing](../accessibility-testing/) - VoiceOver, TalkBack
200- [performance-testing](../performance-testing/) - Mobile performance
201- [compatibility-testing](../compatibility-testing/) - Device compatibility
202
203---
204
205## Remember
206
207**Mobile is not a smaller desktop - it's a different platform.** 60%+ of web traffic is mobile. Device fragmentation (1000+ Android devices), touch gestures, sensors, permissions, offline scenarios - all require specific testing.
208
209**Test on real devices for critical flows.** Emulators catch 80% of bugs but real devices needed for actual performance, sensor behavior, and platform quirks.
210
211**With Agents:** `qe-test-executor` orchestrates testing across device farms, manages platform differences, and tests 10+ devices in parallel. Reduces mobile testing from days to hours.