SuperAPI AI 工具集

mobile-testing

测试与质量

查看项目

更新于 10-15 17:30

技能介绍

用途:用 Maestro 以 YAML 流程驱动 iOS 模拟器和 Android 模拟器,在修改 ios-app/ 或 android-app/ 后验证移动应用功能。

主要能力:安装 Maestro;构建 iOS 模拟器包与 Android debug APK;启动模拟器/仿真器并安装应用;运行已有流程或为新功能编写流程;输出 JUnit 报告;使用 maestro studio 交互式探查选择器;用 maestro hierarchy 导出视图树。

必要用法:先确认仓库根目录 builder.config.json 存在且包含 maestro、xcrun、xcodebuild、./gradlew、adb 等 allowedCommands,缺失则创建或合并。仅在 maestro --version 失败时安装: curl -Ls "https://get.maestro.mobile.dev" | bash export PATH="$PATH:$HOME/.maestro/bin" maestro --version iOS 需 Xcode 与模拟器运行时,Android 需 Android SDK、AVD 与 PATH 中的 adb。构建后启动设备、安装应用,再运行如 maestro test maestro/ios/smoke.yaml、maestro test maestro/android/smoke.yaml 或 maestro test maestro/ 运行全部流程;CI 可用 --format junit --output report.xml。流程目录为 maestro/ios、maestro/android、maestro/shared,appId 各平台不同。编写流程时优先使用带无障碍标识的 id: 选择器,SwiftUI 用 .accessibilityIdentifier,Compose 用 Modifier.testTag 并设 testTagsAsResourceId = true。Maestro 不负责构建应用,需先安装;仅能同时 boot 一台 iOS 模拟器;Android 仿真器启动慢,需 adb wait-for-device;依赖可见文案的测试易因文案变更失败;网络不稳定会导致测试不稳定,建议使用确定性数据或在 debug 构建中 mock 网络;不要为测试添加自定义返回按钮以免破坏滑动返回手势。

适用场景:本仓库 iOS/Android 应用的冒烟测试与端到端回归。限制:具体应用标识与流程内容依项目而定;未提供的收费、价格与平台支持细节暂未提供。