Mobile e2e strategy

From event4u-app/agent-config · View interactive version

Mobile e2e strategy is an AI agent skill from the GitHub repository event4u-app/agent-config. Use when picking a mobile E2E framework — Detox / Appium / Maestro / XCUITest / Espresso — or planning iOS Simulator / Android Emulator coverage in CI for RN, Expo, or native apps.

How to use this skill

Skill file

mobile-e2e-strategy

When to use

(playwright-testing, /tests e2e-plan, /tests e2e-heal).

This skill selects and plans — it does not generate test code. For the chosen framework, apply its own conventions; for the host environment, see the cross-links below.

Cross-links

Procedure

  1. Inspect and classify the app. Identify the stack: native iOS, native Android, React Native, Expo, Flutter, or a web view inside a shell?
  2. Classify the goal. Smoke (boots + login + key flow), regression (every release), visual diff, accessibility audit, or performance baseline.
  3. Pick the framework using the decision matrix below.
  4. Confirm host availability. macOS for iOS Simulator (mandatory); any OS for Android Emulator.
  5. Plan CI coverage. Decide runner type, parallelism, and whether iOS coverage runs every PR or nightly only.
  6. Define the artefact contract. Screenshots, accessibility trees, video, log archives — name the storage path and retention.
  7. Validate. Run a single smoke test locally before wiring CI; verify both iOS and Android paths if both are in scope.

Decision matrix — framework selection

| Framework | Best for | Avoid when |

|---|---|---|

| Detox | React Native apps, gray-box testing, deterministic sync with the JS bridge | Native iOS/Android-only; Expo managed without a dev client |

| Maestro | Cross-platform smoke + regression, declarative YAML flows, fast onboarding | Need full programmable assertions or deep native introspection |

| Appium | Truly cross-platform (RN + Flutter + native), one team owning many apps, WebDriver-compatible tooling | Solo project — setup overhead is high; flaky on JS-heavy RN unless tuned |

| XCUITest (iOS) | Native iOS apps, deepest Apple toolchain integration, Xcode Cloud | Cross-platform coverage in one suite |

| Espresso (Android) | Native Android apps, in-process execution, fast reliable runs | Cross-platform coverage in one suite |

| Playwright + WebView | Web app embedded in a thin native shell, purely web flows | Native UI flows of any depth (use a mobile framework instead) |

Default starting point:

Host & environment prerequisites

iOS (macOS-only)

Android (any host)

Authoritative upstream docs

CI floor — cost and capacity

| Concern | iOS | Android |

|---|---|---|

| Runner OS | macOS only (GitHub macos-latest, self-hosted Mac) | Any (Linux fastest) |

| Boot time | 30–90 s per simulator cold-boot | 60–180 s per emulator cold-boot |

| Parallelism | 1 simulator per macOS runner is the safe default | KVM-accelerated on Linux scales well |

| Cost (GitHub Actions) | macOS minutes are ~10× Linux minutes | Standard Linux pricing |

| Recommended cadence | Nightly + on-release for full suite; smoke on every PR | Every PR feasible |

Pragmatic split:

release cadence demands per-PR iOS parity.

Artefact contract (recommended)

For every E2E run the suite SHOULD persist:

  1. Screenshots — per-step PNG, named {suite}/{test}/{step}.png.
  2. Accessibility tree — JSON dump per failure (iOS via idb ui describe-all --json --nested, Android via Espresso accessibility checks).
  3. Video — full run on failure; first-class for Detox and Maestro.
  4. Logs — structured logcat (Android) or simctl spawn log (iOS) filtered to the app under test.
  5. Result XML / JUnit — for CI dashboard ingestion.

Retain artefacts for at least one release cycle; promote screenshots

of failures to the PR comment surface so reviewers see the failure

without leaving the review.

Bridging to the existing E2E surface

Output format

  1. A framework recommendation keyed off app type + team shape + cross-platform need.
  2. A host & runner plan naming the macOS/Linux split for CI.
  3. A cadence plan (per-PR vs nightly) with cost rationale.
  4. An artefact contract listing screenshot/log/video/accessibility-tree paths.

Auto-trigger keywords

Gotcha

Do NOT

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.