mcpField
M
mobile-testing

mobile-testing

github.com/proffesor-for-testing测试与质量520171 次安装1 天前更新
代码仓库

关于 mobile-testing

面向团队的移动应用测试技能,适用于验证 iOS、Android、混合应用和移动 Web 应用。它规划设备覆盖,并提供平台差异、手势、网络、权限和中断场景的检查方法。

主要功能

  1. 01规划设备覆盖矩阵
  2. 02检查 iOS 与 Android 差异
  3. 03验证触摸手势
  4. 04测试离线与中断场景
  5. 05真实设备和模拟器使用建议

适用场景

  1. 01规划移动应用发布的设备覆盖
  2. 02测试平台特有的导航和权限
  3. 03验证手势及离线行为
  4. 04准备移动应用商店提交

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill mobile-testing

安装后在 Claude Code 中输入/mobile-testing确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

evals/
mobile-testing.yaml
schemas/
output.json
scripts/
validate-config.json

详细介绍

移动端测试

<default_to_action> 测试移动应用时:

  1. 定义设备覆盖矩阵(第 1 层:60%,第 2 层:30%,第 3 层:10%)
  2. 测试平台差异(iOS ≠ Android:返回按钮、权限、UI)
  3. 验证触控手势(轻触、滑动、捏合、长按)
  4. 测试移动端特有场景(离线、低电量、中断)
  5. 关键路径使用真实设备,快速反馈使用模拟器

移动端快速检查清单:

  • 在最新的 iOS 和 Android 旗舰设备上测试
  • 测试离线模式和网络切换
  • 验证推送通知是否正常
  • 测试手势交互(滑动、捏合)
  • 检查权限流程(相机、位置、通知)

关键成功因素:

  • 80% 的测试使用模拟器,20% 的关键路径使用真实设备
  • 在用户实际使用的设备上测试(通过分析数据确定)
  • 设备碎片化是 Android 面临的最大挑战 </default_to_action>

快速参考卡

适用场景
  • 原生应用开发(iOS/Android)
  • 混合应用(React Native、Flutter)
  • 移动网页 / PWA
  • 准备提交到应用商店
iOS 与 Android 的差异
方面iOSAndroid
OS 版本支持 2-3 个版本有 10+ 个版本在使用
设备约 40 款机型1000+ 种型号
返回按钮手势/导航硬件/软件
权限单次提示运行时细粒度授权
应用商店审核严格Google Play + 侧载
设备覆盖层级
层级覆盖率设备
第 1 层60% 的用户iPhone 15、Galaxy S24、iPad
第 2 层30% 的用户iPhone 14/13、Pixel 8
第 3 层10% 的用户较旧设备、其他制造商的设备

移动端特有场景

// 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 驱动的移动端测试

// 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 协作提示

记忆命名空间
aqe/mobile-testing/
├── device-matrix/*      - Device coverage strategy
├── platform-tests/*     - iOS/Android specific tests
├── gesture-library/*    - Reusable gesture patterns
└── performance/*        - Mobile performance metrics
集群协作
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'
});

相关技能


请记住

关键流程要在真实设备上测试。 模拟器可以发现 80% 的缺陷,但要了解实际性能、传感器行为和平台特性,仍需使用真实设备。

使用 Agent: qe-test-executor 可协调跨设备农场的测试、管理平台差异,并行测试 10+ 台设备。

评论

支持 Markdown