mobile-testing
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMobile Testing
移动测试
<default_to_action>
When testing mobile applications:
- DEFINE device coverage matrix (Tier 1: 60%, Tier 2: 30%, Tier 3: 10%)
- TEST platform differences (iOS ≠ Android: back button, permissions, UI)
- VALIDATE touch gestures (tap, swipe, pinch, long-press)
- TEST mobile-specific scenarios (offline, low battery, interruptions)
- USE real devices for critical paths, emulators for fast feedback
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 </default_to_action>
<default_to_action>
测试移动应用时:
- 定义设备覆盖矩阵(Tier 1:60%,Tier 2:30%,Tier 3:10%)
- 测试平台差异(iOS ≠ Android:返回按钮、权限、UI)
- 验证触摸手势(点击、滑动、捏合、长按)
- 测试移动专属场景(离线、低电量、中断)
- 关键路径使用真实设备测试,模拟器用于快速反馈
快速移动测试检查清单:
- 在最新iOS + Android旗舰设备上测试
- 测试离线模式和网络切换
- 验证推送通知功能正常
- 测试手势交互(滑动、捏合)
- 检查权限流程(相机、位置、通知)
关键成功因素:
- 80%的测试使用模拟器,20%的关键路径使用真实设备
- 在用户实际使用的设备上测试(参考分析数据)
- 设备碎片化是Android面临的最大挑战 </default_to_action>
Quick Reference Card
快速参考卡片
When to Use
适用场景
- Native app development (iOS/Android)
- Hybrid apps (React Native, Flutter)
- Mobile web / PWAs
- App store submission preparation
- 原生应用开发(iOS/Android)
- 混合应用(React Native、Flutter)
- 移动网页 / PWA
- 应用商店提交准备
iOS vs Android Differences
iOS与Android差异
| 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 |
| 维度 | iOS | Android |
|---|---|---|
| 操作系统版本 | 支持2-3个版本 | 10+个版本在使用 |
| 设备 | ~40款机型 | 1000+种变体 |
| 返回按钮 | 手势/导航栏 | 硬件/软件按钮 |
| 权限 | 单次提示 | 运行时细粒度控制 |
| 应用商店 | 严格审核 | Google Play + 侧载 |
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 |
| 层级 | 覆盖用户比例 | 设备示例 |
|---|---|---|
| Tier 1 | 60%用户 | iPhone 15、Galaxy S24、iPad |
| Tier 2 | 30%用户 | iPhone 14/13、Pixel 8 |
| Tier 3 | 10%用户 | 旧款设备、其他品牌设备 |
Mobile Performance Goals
移动性能目标
| Metric | Target |
|---|---|
| App launch | < 2 seconds |
| Screen transition | < 300ms |
| Frame rate | 60 FPS |
| Battery drain | < 5%/hour background |
| 指标 | 目标值 |
|---|---|
| 应用启动时间 | < 2秒 |
| 页面切换时间 | < 300ms |
| 帧率 | 60 FPS |
| 后台电池消耗 | < 5%/小时 |
Touch Gesture Testing
触摸手势测试
javascript
// 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
});javascript
// 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
移动专属场景测试
javascript
// 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();
});javascript
// 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
Agent驱动的移动测试
typescript
// 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");typescript
// 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
Agent协作提示
Memory Namespace
内存命名空间
aqe/mobile-testing/
├── device-matrix/* - Device coverage strategy
├── platform-tests/* - iOS/Android specific tests
├── gesture-library/* - Reusable gesture patterns
└── performance/* - Mobile performance metricsaqe/mobile-testing/
├── device-matrix/* - Device coverage strategy
├── platform-tests/* - iOS/Android specific tests
├── gesture-library/* - Reusable gesture patterns
└── performance/* - Mobile performance metricsFleet Coordination
集群协作
typescript
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'
});typescript
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
相关技能
- accessibility-testing - VoiceOver, TalkBack
- performance-testing - Mobile performance
- compatibility-testing - Device compatibility
- 可访问性测试 - VoiceOver、TalkBack
- 性能测试 - 移动性能测试
- 兼容性测试 - 设备兼容性测试
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: orchestrates testing across device farms, manages platform differences, and tests 10+ devices in parallel. Reduces mobile testing from days to hours.
qe-test-executor移动平台并非桌面平台的缩小版——它是一个完全不同的平台。 超过60%的网页流量来自移动设备。设备碎片化(1000+款Android设备)、触摸手势、传感器、权限、离线场景等都需要针对性测试。
关键流程务必使用真实设备测试。 模拟器能发现80%的问题,但真实设备才能测试实际性能、传感器行为和平台特性。
借助Agent: 可跨设备集群编排测试,处理平台差异,并行测试10+台设备。将移动测试时间从数天缩短至数小时。
qe-test-executor