agentleFS
ai-enhanced-engineerai-enhanced-engineer/aiee-skills/skills/mobile-e2e-testing/SKILL.md

mobile-e2e-testing

Skill4 starsChanged 5 months agoMITView on GitHub

Mobile E2E testing patterns with Maestro (YAML-based, recommended) and Detox for React Native. Device farms, camera/video test strategies, accessibility testing, and CI/CD integration. Use for automated mobile testing.

The file

Files
SKILL.md

Mobile E2E Testing

Framework Comparison

AspectMaestroDetoxAppium
LanguageYAMLJavaScript/TSAny (WebDriver)
Setup TimeMinutesHoursHours
Flakiness<1%<2%5-10%
Speed (per flow)12-18s8-12s30-45s
App ModificationsNoneNative hooksNone
Learning CurveLowMediumHigh
WebView SupportLimitedLimitedGood

Maestro is the emerging standard for React Native E2E testing. Expo officially recommends it for EAS workflows. Detox remains strong for teams needing programmatic JavaScript control and gray-box testing. Appium serves cross-platform and multi-framework scenarios.

Testing Pyramid

  • 70% Unit tests (Jest) -- pure functions, hooks, utilities
  • 20% Component tests (React Native Testing Library) -- user interactions
  • 10% E2E tests (Maestro or Detox) -- critical user journeys only

Camera and Video Testing

Camera feed injection is not natively supported by Maestro or Detox. Permission granting and denying can be tested directly. Actual camera input mocking requires device farm integration (BrowserStack Camera Image Injection, Sauce Labs) or app-level mock layers.

Local E2E Environment Gotchas

Three traps that surface when running E2E tests locally against a dev server:

  1. CORS origin mismatch: CORS allowlists with a localhost regex carve-out reject the 127.0.0.1 origin. Drive the browser or Playwright via localhost:<port>, not 127.0.0.1.
  2. Multi-worktree port conflict: In multi-worktree setups, boot a second dev server on an alternate port pointed at the shared backend (PORT=3001 npm run dev) to E2E the current branch when another worktree already holds the default port.
  3. Dev server teardown: A broad process-name kill (pkill -f "<framework>.*dev") clobbers sibling worktrees' dev servers; tear down by port instead (lsof -ti tcp:PORT | xargs kill).

See reference.md → Local E2E Environment Gotchas for detailed examples.

Further Reference

  • reference.md -- setup guides, local E2E gotchas, device farm comparison, accessibility patterns, anti-patterns
  • examples.md -- production-ready Maestro YAML, Detox TypeScript, Jest component tests, CI workflows

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.