maestro-mobile-testing

Write declarative YAML end-to-end tests for React Native and Expo mobile apps with Maestro.

23|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tovimx/maestro-mobile-testing-skill --skill maestro-mobile-testing-tovimx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maestro-mobile-testing
Source: https://github.com/tovimx/maestro-mobile-testing-skill
Command: npx skills add https://github.com/tovimx/maestro-mobile-testing-skill --skill maestro-mobile-testing-tovimx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Mobile E2E tests for React Native and Expo apps are often flaky due to race conditions, auth state timing, native alerts, and platform differences between iOS and Android. This Skill provides proven Maestro patterns that eliminate these failure modes and produce stable, CI-ready test flows. ## Core Features & Use Cases - Declarative YAML Test Flows: Write tests with testID or text selectors, relative position selectors, state properties, sub-flows, and adaptive auth-aware conditions. - Auth & OTP Testing: Capture OTP codes from email services like Mailpit using GraalJS scripts, handle both guest and authenticated states, and avoid the iOS Keychain clearState pitfall. - CI/CD & Cloud Integration: Run tests in GitHub Actions with Maestro Cloud, filter flows by tags, and use the Maestro MCP server for a write-run-fix loop with AI agents. - Use Case: You need to verify an optimistic update in your Expo app. Write a flow that taps a button, asserts the UI changes within 3 seconds before the server responds, and captures screenshots at each step. ## Quick Start Ask the AI to write a Maestro E2E test flow for your React Native app's login screen using testID selectors and the auth-loaded pre-flight pattern.

Frequently Asked Questions about maestro-mobile-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Maestro E2E tests for React Native apps?

Write declarative YAML flows with an appId header and step commands like launchApp, tapOn, and assertVisible. Add testID props to your React Native components for stable selectors, and run tests with the maestro test command.

Maestro vs Detox vs Appium for React Native testing?

Maestro uses declarative YAML with automatic waiting and built-in retry logic, making it more stable than Detox or Appium for React Native apps. It requires no imperative test code and runs with minimal setup overhead.

How do I test OTP authentication in Maestro?

Use an email capture service like Mailpit and fetch the OTP via Maestro's GraalJS runtime with http.get calls. Enter digits individually into otp-input-N testID fields, tapping each input before typing to handle auto-focus.

Why does clearState not log out my iOS app in Maestro?

clearState clears the app sandbox but not the iOS Keychain, so tokens stored via expo-secure-store persist. Skip clearState for auth tests and use an auth-loaded pre-flight marker with adaptive flows instead.

Can Maestro run iOS tests in CI/CD pipelines?

iOS tests cannot run in Docker or Linux CI because they require macOS. Use Maestro Cloud with the official GitHub Action to run iOS tests on real devices, or run Android tests locally in Docker.

Why does Maestro crash with kAXErrorInvalidUIElement on iOS?

The XCTest driver crashes when Maestro interacts with the accessibility tree before the first render completes on cold boot. Add a short no-op swipe immediately after launchApp to prevent this.