juanmarchetto/agent-skills/maestro-mobile-testing
- community
Checking that the SKILL.md file is still in the repository.
Maestro mobile E2E testing patterns for React Native/Expo apps: YAML test flows, testID selectors, adaptive auth state, optimistic update verification, GraalJS scripting, cross-platform stability, CI/CD integration, Maestro Cloud, and MCP server integration. Use when: write Maestro test, flaky mobile test, test my app, automate mobile testing, mobile E2E, debug test failure, Maestro setup.
Install
npx vskill@latest install juanmarchetto/agent-skills/maestro-mobile-testingSKILL.md
Maestro Mobile E2E Testing
Overview
Maestro is a declarative YAML-based mobile E2E testing framework. It provides automatic waiting, built-in retry logic, and fast execution without boilerplate. It's more stable than Detox or Appium for React Native apps.
Key Features
- Declarative YAML — no imperative test code, just steps
- Automatic waiting — no manual
sleep()or flaky waits - Built-in retry — reduces test flakiness
- Fast execution — runs quickly without setup overhead
- Maestro Studio — interactive test builder (
maestro studio) - Sub-flows — reusable YAML sequences for DRY tests
- JavaScript scripting — GraalJS runtime for HTTP calls and data manipulation
- Maestro Cloud — real device testing in CI without local simulators
Quick Start
Install
Minimal test
Run
Pattern Index
| # | Pattern | Reference | |
|---|---|---|---|
| 1 | Selector Strategy: testID vs Text | core-patterns.md | |
| 2 | Auth Pre-Flight Pattern | core-patterns.md | |
| 3 | Adaptive Tests (Both Auth States) | core-patterns.md | |
| 4 | Testing Optimistic Updates | core-patterns.md | |
| 5 | Dismissing Native Alerts | core-patterns.md | |
| 6 | Sub-Flows for Reusability | core-patterns.md | |
| 7 | Deep Links (Expo) | core-patterns.md | |
| 8 | Platform-Specific Logic | core-patterns.md | |
| 9 | Environment Variables | core-patterns.md | |
| 10 | Selector State Properties | core-patterns.md | |
| 11 | Relative Position Selectors | core-patterns.md | |
| - | OTP/Magic-Link Auth Testing | auth-testing.md | |
| - | CI/CD & Maestro Cloud | ci-cd.md | |
| - | Critical Gotchas & Platform Differences | gotchas.md | |
| - | MCP Server Integration | mcp-integration.md |
Test File Template
Example Output
Running a Maestro test produces output like this:
Screenshots are saved to ~/.maestro/tests/{timestamp}/.
Folder Structure
Naming Conventions
| Type | Pattern | Example | |
|---|---|---|---|
| Main test | {feature}-{action}.yaml | checkout-purchase.yaml | |
| Sub-flow | {action}-{context}.yaml | auth-and-return-to-dashboard.yaml | |
| Script | {verb}-{noun}.js | fetch-otp.js |
Troubleshooting
Device Not Found
Cause: No simulator/emulator running, or Maestro can't detect it.
Fix:
- iOS: Open Xcode > Window > Devices and Simulators > boot a simulator, or run
xcrun simctl boot "iPhone 16" - Android: Start emulator with
emulator -avd <name>or open Android Studio > Device Manager - Verify with
maestro devices(should list at least one device)
Element Not Found
Cause: The element hasn't rendered yet, the testID is wrong, or a native alert is blocking it.
Fix:
- Run
maestro hierarchyto see all elements on screen — check if your element exists - Use
maestro studioto interactively explore the element tree - Add
extendedWaitUntilbefore the interaction (the element may need time to render) - Check if a native alert or permission dialog is blocking — add
tapOn: text: "OK" optional: truebefore your step - Verify the testID is actually set in your React Native component (
testID="my-button")
Flaky Tests
Symptoms: Test passes sometimes, fails other times.
Common causes and fixes:
- Race conditions: Add auth pre-flight pattern (Pattern 2) — don't interact before auth resolves
- Animations: Use
extendedWaitUntilinstead of fixedsleepcalls - Network dependency: Start a mock API server instead of relying on real backends
- iOS cold boot crash: Add the post-launch swipe (see gotchas.md)
- Optional elements: Don't use
optional: trueunless the action is genuinely optional
Checklist for New Tests
Debugging
Resources
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/maestro-mobile-testing/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/juanmarchetto/agent-skills/maestro-mobile-testing)