This is a comprehensive guide to writing Maestro E2E tests for React Native and Expo apps, with a strong focus on eliminating flakiness. The patterns here are battle-tested: an auth-loaded pre-flight marker to prevent race conditions on cold boot, adaptive flows that handle both authenticated and unauthenticated states, and testID selectors that survive translations. The optimistic update verification pattern is clever, using short 3-second timeouts to prove UI changes happen before server responses. Also covers sub-flows for reusability, GraalJS scripting for API mocks, and Maestro Cloud integration. If you're tired of flaky mobile tests or migrating from Detox, the selector strategy table and native alert handling alone are worth reading.

skills.sh installs
1.2K
GitHub stars
28
last updated
Jul 14, 2026

Install

$ npx -y skills add tovimx/maestro-mobile-testing-skill --skill maestro-mobile-testing --agent claude-code

Installs into .claude/skills of the current project.

Files

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

curl -Ls "https://get.maestro.mobile.dev" | bash
brew install openjdk@17
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home

Minimal test

appId: com.myapp
---
- launchApp
- tapOn:
    id: "my-button"
- assertVisible: "Expected Text"

Run

Sponsors

Details

Repository
github.com/tovimx/maestro-mobile-testing-skill
Categories
Testing & QA, Mobile Development
First seen
Jun 3, 2026
1moxa avatarbdd-feature-generatormoxa/swbdd feature generator1.2Kskills.sh installs
2facebook avatartestfacebook/reacttest1.1Kskills.sh installs
3flutter avatarflutter-testingflutter/skillsflutter testing1.1Kskills.sh installs
4jnmetacode avatartest-driven-developmentjnmetacode/superpowers-zh在实现任何功能或修复 bug 时使用,在编写实现代码之前1.1Kskills.sh installs
5microsoft avatarfile-test-bugmicrosoft/azure-skillsfile test bug924skills.sh installs
6mindrally avatartestingmindrally/skillsGeneral testing best practices and guidelines for writing comprehensive, maintainable tests across different testing frameworks and languages.861skills.sh installs