Skip to content
maestro-testing logo

Maestro Testing Skill

maestro-testing

Maestro E2E testing patterns for React Native. Use when implementing end-to-end tests.

SKILL.md

Full skill instructions

Maestro Testing Skill

This skill covers Maestro E2E testing for React Native apps.

When to Use

Use this skill when:

  • Writing E2E tests
  • Testing user flows
  • Automating UI testing
  • CI/​CD testing

Core Principle

YAML SIMPLICITY - Maestro uses simple YAML syntax for readable, maintainable tests.

Installation

# macOS/​Linux
curl -Ls "https://get.maestro.mobile.dev" | bash

# Verify installation
maestro -v

Project Structure

__tests__/
└── e2e/
    ├── flows/
    │   ├── login.yaml
    │   └── common.yaml
    ├── login_flow.yaml
    ├── signup_flow.yaml
    ├── navigation_flow.yaml
    └── checkout_flow.yaml

Basic Test

# __tests__/​e2e/​login_flow.yaml
appId: com.myapp
---
- launchApp
- tapOn: "Email"
- inputText: "[email protected]"
- tapOn: "Password"
- inputText: "password123"
- tapOn: "Sign In"
- assertVisible: "Welcome"

Common Commands

App Control

# Launch app
- launchApp

# Clear app state and launch
- launchApp:
    clearState: true

# Stop app
- stopApp

Tap Actions

# Tap by text
- tapOn: "Button Text"

# Tap by accessibility ID
- tapOn:
    id: "submit-button"

# Tap by index (when multiple matches)
- tapOn:
    text: "Item"
    index: 0

# Long press
- longPressOn: "Delete"

Text Input

# Input text
- inputText: "Hello World"

# Clear and input
- clearText
- inputText: "New Text"

# Input in specific field
- tapOn: "Email"
- inputText: "[email protected]"

Assertions

# Assert element is visible
- assertVisible: "Success"

# Assert element is not visible
- assertNotVisible: "Error"

# Assert with timeout
- extendedWaitUntil:
    visible: "Loaded"
    timeout: 10000

Scrolling

# Scroll down
- scroll

# Scroll until visible
- scrollUntilVisible:
    element: "Target Item"
    direction: DOWN
    timeout: 10000

# Scroll in element
- scroll:
    element:
      id: "scrollable-list"
    direction: DOWN

Swipe Gestures

# Swipe left (delete)
- swipe:
    direction: LEFT
    start: "Item to delete"

# Swipe down (refresh)
- swipe:
    direction: DOWN
    start:
      above: "First Item"

Waiting

# Wait for animation
- waitForAnimationToEnd

# Wait specific time (ms)
- wait: 2000

# Wait until visible
- extendedWaitUntil:
    visible: "Element"
    timeout: 5000

Screenshots

# Take screenshot
- takeScreenshot: screen_name

Flow Composition

Reusable Flows

# flows/​login.yaml
- tapOn: "Email"
- inputText: ${email}
- tapOn: "Password"
- inputText: ${password}
- tapOn: "Sign In"
- assertVisible: "Welcome"
# main_test.yaml
- launchApp
- runFlow:
    file: flows/​login.yaml
    env:
      email: "[email protected]"
      password: "password123"
- tapOn: "Profile"

Conditional Flows

# Handle optional popups
- runFlow:
    when:
      visible: "Accept Cookies"
    commands:
      - tapOn: "Accept"

- tapOn: "Continue"

Environment Variables

# Use environment variables
appId: ${APP_ID}
---
- launchApp
- tapOn: "Email"
- inputText: ${TEST_EMAIL}
# Run with variables
APP_ID=com.myapp [email protected] maestro test test.yaml

Platform-Specific Tests

# iOS-specific
- runFlow:
    when:
      platform: iOS
    commands:
      - tapOn: "iOS Settings"

# Android-specific
- runFlow:
    when:
      platform: Android
    commands:
      - tapOn: "Android Settings"

Complete Test Examples

Login Flow

# __tests__/​e2e/​login_flow.yaml
appId: com.myapp
---
- launchApp:
    clearState: true

# Navigate to login
- tapOn: "Sign In"

# Enter credentials
- tapOn:
    id: "email-input"
- inputText: "[email protected]"

- tapOn:
    id: "password-input"
- inputText: "password123"

# Submit
- tapOn:
    id: "login-button"

# Wait for navigation
- waitForAnimationToEnd

# Verify success
- assertVisible: "Welcome back"
- assertVisible: "Home"

# Take screenshot
- takeScreenshot: login_success

Form Validation

# __tests__/​e2e/​form_validation.yaml
appId: com.myapp
---
- launchApp

# Test empty submission
- tapOn: "Submit"
- assertVisible: "Email is required"

# Test invalid email
- tapOn: "Email"
- inputText: "invalid"
- tapOn: "Submit"
- assertVisible: "Invalid email"

# Test valid submission
- clearText
- inputText: "[email protected]"
- tapOn: "Password"
- inputText: "ValidPass123!"
- tapOn: "Submit"
- assertVisible: "Success"

Navigation Flow

# __tests__/​e2e/​navigation_flow.yaml
appId: com.myapp
---
- launchApp

# Test tab navigation
- tapOn:
    id: "tab-home"
- assertVisible: "Home Screen"

- tapOn:
    id: "tab-search"
- assertVisible: "Search"

- tapOn:
    id: "tab-profile"
- assertVisible: "Profile"

# Test back navigation
- tapOn: "Settings"
- assertVisible: "Settings"
- back
- assertVisible: "Profile"

Running Tests

# Run single test
maestro test __tests__/​e2e/​login_flow.yaml

# Run all tests
maestro test __tests__/​e2e/

# Run on specific platform
maestro test __tests__/​e2e/ --platform ios

# Generate JUnit report
maestro test __tests__/​e2e/ --format junit --output results/

CI/​CD Integration

# .github/​workflows/​e2e.yml
name: E2E Tests

on: [push, pull_request]

jobs:
  e2e:
    runs-on: macos-latest
    steps:
      - uses: actions/​checkout@v4

      - name: Setup Node
        uses: actions/​setup-node@v4

      - name: Install dependencies
        run: npm ci

      - name: Install Maestro
        run: |
          curl -Ls "https://get.maestro.mobile.dev" | bash
          echo "$HOME/​.maestro/​bin" >> $GITHUB_PATH

      - name: Build app
        run: npx expo prebuild && npx expo run:ios

      - name: Run E2E tests
        run: maestro test __tests__/​e2e/

      - name: Upload results
        uses: actions/​upload-artifact@v3
        with:
          name: e2e-results
          path: results/

Notes

  • Requires simulator/​emulator running
  • Use accessibility IDs for reliable selection
  • Keep tests independent
  • Use reusable flows for common actions
  • Test on both platforms
  • Consider Maestro Cloud for CI

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View