Mobile Testing 标志

Mobile Testing

社区
petrkindlmann
mobile-testing

Test native, React Native, hybrid, and Flutter mobile apps with Appium 3.x, Detox, Maestro, and Patrol. Covers device farm setup (BrowserStack, Sauce Labs), gesture simulation, deep link and cold-start testing, push notifications, biometric (Face ID) auth, offline/poor-network simulation, and iOS/Android permission dialog handling. Use when: "mobile test," "Appium," "Detox," "Maestro," "Patrol," "Flutter test," "iOS test," "Android test," "device farm," "deep link," "biometric," "Face ID," "permission dialog," "React Native test." Not for: device/browser matrix strategy in the abstract — use cross-browser-testing; app startup/memory/battery profiling depth — use performance-testing; mobile screenshot diffing — use visual-testing. Related: ci-cd-integration, cross-browser-testing, performance-testing, test-data-management, test-reliability.

Add to TypingMind

概览

发布者petrkindlmann
代码仓库qa-skills
技能名称mobile-testing
星标数
205
复刻数
35
附带文件
4
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 4 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 petrkindlmann 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Mobile Testing AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/petrkindlmann/qa-skills/tree/main/skills/mobile-testing
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/petrkindlmann/qa-skills.git /tmp/qa-skills
mkdir -p .claude/skills
cp -r /tmp/qa-skills/skills/mobile-testing .claude/skills/mobile-testing
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Mobile Testing,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Mobile Testing。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Mobile Testing 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。


Quick Route

SituationGo to
Picking a framework for an app typeFramework Decision
Native/hybrid Appium setup + selectors + gesturesAppium 3.x → references/appium-patterns.md
React Native suiteDetox → references/detox-and-maestro.md
Low-friction cross-platform YAMLMaestro → references/detox-and-maestro.md
Cloud device matrix (P0/P1/P2)Device Farm → references/device-farm.md
Deep links, push, biometrics, offline, permissionsMobile-Specific Patterns → references/mobile-patterns.md

Discovery Questions

Check .agents/qa-project-context.md in the project root first — if it exists, use it and skip any question it already answers.

  1. App type: Native iOS/Android, React Native, Flutter, or hybrid (Cordova/Capacitor)? This picks the framework (see Framework Decision).
  2. Real devices or emulators? Real devices for release validation and performance; emulators/simulators for development speed. Most teams need both.
  3. Device farm: BrowserStack App Automate, Sauce Labs, AWS Device Farm, or self-hosted? Budget and CI integration decide.
  4. OS coverage: Minimum iOS and Android versions? Read analytics for actual user distribution before building the matrix — do not target the newest hardware by default.
  5. Existing CI pipeline: Where do mobile tests run — local machines, CI runners with emulators, or cloud device farms?
  6. App distribution: How are test builds distributed — TestFlight, Firebase App Distribution, direct APK/IPA? This determines how the farm gets the binary.

Core Principles

  1. Real devices for release, emulators for speed. Emulators miss touch latency, GPS drift, camera quirks, push notification timing, and battery behavior. Use emulators in development and PR checks; reserve real device farms for nightly and release pipelines.

  2. Gesture simulation is framework-specific. Appium W3C Actions, Detox device APIs, and platform-native gesture recognizers each handle swipes, pinches, and long-presses differently. Do not assume cross-framework portability.

  3. Deep links and push notifications are unique to mobile. Web testing frameworks cannot reach them. Dedicated patterns exist for each — treat them as first-class scenarios, not afterthoughts.

  4. Permission dialogs break assumptions. iOS and Android handle runtime permissions differently. Camera, location, contacts, and notification permissions need explicit handling in setup or the test hangs waiting for a dialog it cannot dismiss.

  5. Network conditions matter more on mobile. Users switch between WiFi, LTE, 3G, and offline. Test degraded and absent connectivity — not just happy-path WiFi.

  6. Anything platform-specific needs a platform guard. A shell command, selector, or device API that works on Android may not exist on iOS (and vice versa). Branch on platformName before issuing platform-specific commands, or the test fails silently on the other platform.


Framework Decision

App typePrimary choiceWhy
Native iOS/Android, hybridAppium 3.xDriver-based, mature ecosystem, deepest native + gesture coverage
React NativeDetoxGray-box, synchronizes with the RN bridge, fastest feedback, least flake
Cross-platform, mixed-skill teamMaestroDeclarative YAML, native AI commands, lowest authoring friction
FlutterPatrol 4.xFlutter-native integration testing; 4.0 added web support (via Playwright) and richer native interaction APIs

Appium 3.x

Appium 3.x (current stable line, 2026) keeps the driver-based plugin architecture introduced in 2.0 — the server is a thin shell; drivers provide platform-specific automation. Upgrade from 2.x is mostly a Node-version bump and dependency cleanup; most capabilities carry over, but Appium 3 dropped several long-deprecated commands and changed plugin/driver handling, so check the 3.x migration notes for removed legacy commands.

Selector priority: Accessibility ID > platform-specific selector (iOS class chain / Android UIAutomator) > XPath (last resort — slow, brittle).

Guard platform-specific commands. Branch on platformName before any platform-only shell command, selector strategy, or device API:

typescript
if (driver.capabilities.platformName === 'Android') {
  // UIAutomator selectors, `mobile: shell` network toggles
} else {
  // iOS class chain / predicate selectors, `mobile: alert`, device-farm network profiles
}

See references/appium-patterns.md for install/driver commands, W3C Android/iOS capabilities, the four element-location strategies, and the full gesture set (scroll, swipe, pinch, long-press, double-tap).


Detox for React Native

Detox is a gray-box framework. It synchronizes with the React Native bridge, waiting for animations, network requests, and timers to settle before acting — this eliminates most timing flakiness.

Detox supports React Native 0.77–0.84, including the New Architecture. Use by.id/by.text matchers as the default; reach for by.type() only to relax a brittle exact-class assertion.

Biometric ordering rule: enroll the biometric with device.setBiometricEnrollment(true) before calling device.matchBiometric(). Matching without prior enrollment is a no-op and the auth flow never advances.

Push notifications are iOS-only via sendUserNotification. On Android, Detox push handling is limited and sendUserNotification behavior differs — drive Android push through FCM/the notification shade (Appium pattern) instead of assuming parity.

See references/detox-and-maestro.md for the .detoxrc.js config, login-flow test patterns, device APIs (biometric, shake, orientation, location, deep link, notifications), and CI build/test commands.


Maestro (Cross-Platform YAML)

Maestro CLI 2.5.x (Apr 2026) is the lowest-friction option for cross-platform mobile e2e — declarative YAML flows, native AI-assisted commands (assertVisible: 'login button' works without selectors), running against simulators, real devices, and Maestro Cloud. Best for teams that don't want Appium's Java/JS stack or RN-only Detox tooling.

bash
# macOS (preferred — lower friction, brew-managed):
brew tap mobile-dev-inc/tap && brew install mobile-dev-inc/tap/maestro
# Or the cross-platform curl one-liner:
curl -Ls "https://get.maestro.mobile.dev" | bash

When to choose Maestro: cross-platform suite, mixed-skill team, fast iteration. When not: deep native gesture or biometric coverage (Appium/Detox win), or when you need fine-grained programmatic control.

See references/detox-and-maestro.md for an annotated login flow YAML (with ${MAESTRO_TEST_PASSWORD} env-var injection).


Device Farm Integration

Provision a tiered device matrix from analytics, not from the newest hardware. Typical split: 60% of tests on P0 devices, 30% on P1, 10% on P2. Test apps are uploaded to the farm and referenced by capability (app URL / storage:filename).

See references/device-farm.md for BrowserStack and Sauce Labs capability objects, the authenticated app-upload curl, and the GitHub Actions device-matrix strategy (P0/P1/P2 across iOS and Android).


Mobile-Specific Testing Patterns

These scenarios cannot be tested by web frameworks. Treat each as a first-class flow.

  • Deep links — cold start (terminate then deep-link), authenticated redirect, and running-app navigation.
  • Push notifications — Detox sendUserNotification (iOS) and Appium + FCM test-endpoint / notification-shade patterns (Android).
  • Offline / poor network — platform-guarded: Android mobile: shell airplane-mode, device-farm network profiles, iOS conditioner / Detox proxy notes.
  • Permission dialogs — autoGrantPermissions (Android), explicit mobile: alert (action: accept/dismiss) and -ios predicate string handling (iOS).
  • Biometrics — Detox setBiometricEnrollment(true) then matchBiometric() (enroll before match).
  • App lifecycle — background/foreground, cold start, fresh install vs. resume.

See references/mobile-patterns.md for the runnable code, including the platform-guarded airplane-mode snippet and the iOS-vs-Android permission split.


Anti-Patterns

Running all tests on emulators only. Emulators do not reproduce touch latency, camera behavior, GPS drift, or push timing. Use emulators for development velocity; run release suites on real devices via a device farm.

Hardcoded device names in tests. await driver.$('Samsung Galaxy S24 - Home') breaks when the device changes. Use accessibility IDs and platform-agnostic selectors.

Platform-specific commands with no platform check. cmd connectivity airplane-mode only exists on newer Android and not at all on iOS; firing it unguarded fails silently on the other platform. Branch on platformName first (see Appium 3.x).

Ignoring app permissions. Tests that assume permissions are pre-granted fail on first install or when testing denial flows. Handle permissions explicitly per platform.

Matching a biometric without enrolling it. matchBiometric() with no prior setBiometricEnrollment(true) is a no-op; the auth never completes and the test times out on the login screen.

Testing only portrait orientation. Many apps break in landscape. Test critical flows in both orientations, especially on tablets.

Skipping offline scenarios. Mobile users lose connectivity constantly. If the app does not handle offline gracefully, prove it; if it does, verify the behavior.

Using sleep() instead of framework synchronization. Detox auto-waits; Appium has implicit and explicit waits. Sleep-based synchronization is slow and flaky on both.

Ignoring app size and startup time. A 200MB app with a 6-second cold start is a real UX issue. Include non-functional checks for binary size and launch time. (For deep startup/memory/battery profiling, use performance-testing.)


Verification

Run the smallest check for whichever framework you set up; each should exit 0 and print the expected output before you call the suite done.

bash
# Appium: drivers installed and server reachable
appium driver list --installed        # lists uiautomator2 and/or xcuitest
appium --version                       # prints the 3.x version

# Detox: one config builds and a smoke spec passes
detox test --configuration ios.sim.debug --headless   # green run on the iOS simulator

# Maestro: a single flow runs end-to-end
maestro test flows/login.yaml          # prints "Flow Passed"

Done When

  • Device matrix defined and committed (e.g. device-matrix.md or a CI matrix block): real devices + emulators per platform, tiered P0/P1/P2 from analytics.
  • Test suite runs against both iOS and Android from a single CI configuration (matrix strategy or paired jobs).
  • A gesture test (swipe/scroll/long-press) and a deep-link cold-start test (terminate → deep-link → assert target screen) exist as committed test files — list their paths.
  • Push notification coverage is either a committed test file path OR a tracked deferral ticket ID (e.g. "JIRA-1234: deferred until FCM test endpoint available") — not a bare code comment.
  • appium driver list --installed / detox test --configuration ios.sim.debug / maestro test flows/login.yaml (whichever applies) exits 0 locally.
  • CI runs tests on at least one emulator per platform (iOS simulator + Android emulator) on every PR, with real-device-farm runs gated to nightly or release branches.

Reference Files (in references/)

  • appium-patterns.md — Appium 3.x install, W3C capabilities, element-location strategies, gesture simulation, and the platform-guard pattern.
  • detox-and-maestro.md — Detox .detoxrc.js config, test patterns, device APIs (biometric ordering, push iOS-only note), CI commands; plus Maestro install (brew + curl) and YAML flow.
  • device-farm.md — BrowserStack and Sauce Labs capabilities, authenticated app-upload curl, and the GitHub Actions P0/P1/P2 device matrix.
  • mobile-patterns.md — Runnable code for deep links, push, platform-guarded network simulation, iOS/Android permission dialogs, and app lifecycle.

Related Skills

  • ci-cd-integration — Pipeline configuration for mobile test execution, artifact management, device-farm CI connectors.
  • cross-browser-testing — Device-matrix design borrows the browser-matrix methodology; go there for matrix strategy in the abstract, here for the mobile execution.
  • performance-testing — Mobile non-functional depth: app startup time, memory usage, battery drain.
  • visual-testing — Screenshot/pixel-diff regression, including mobile viewport captures.
  • test-data-management — Seed data strategies for mobile apps; backend state setup via API.
  • test-reliability — Runtime flaky-test healing for mobile timing, device state, and network conditions.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Mobile Testing AI 技能有什么作用?

Test native, React Native, hybrid, and Flutter mobile apps with Appium 3.x, Detox, Maestro, and Patrol. Covers device farm setup (BrowserStack, Sauce Labs), gesture simulation, deep link and cold-start testing, push notifications, biometric (Face ID) auth, offline/poor-network simulation, and iOS/Android permission dialog handling. Use when: "mobile test," "Appium," "Detox," "Maestro," "Patrol," "Flutter test," "iOS test," "Android test," "device farm," "deep link," "biometric," "Face ID," "permission dialog," "React Native test." Not for: device/browser matrix strategy in the abstract — us...

为什么在 TypingMind 中使用 Mobile Testing?

因为您只需安装一次,就能搭配任何模型使用。Mobile Testing 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Mobile Testing?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/petrkindlmann/qa-skills/tree/main/skills/mobile-testing。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Mobile Testing?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Mobile Testing 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Mobile Testing 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Mobile Testing AI 技能免费吗?

是的。petrkindlmann 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇