Maestro CLI overview
Open-source CLI for mobile and web UI testing. Run tests, manage devices, use Continuous Mode, and scale to Maestro Cloud from your terminal.
The Maestro CLI is an open-source, single-binary framework designed for end-to-end mobile and web UI testing. It allows developers and testers to define user journeys, referred to as Flows, using a simple, declarative YAML syntax.
Learn how to use Maestro CLI
To get up and running with the Maestro CLI, follow these foundational steps:
Installation: Step-by-step instructions for installing the Maestro CLI on macOS, Windows, WSL, and Linux.
Run your first test: A hands-on guide to writing and executing your first Flow on an Android emulator.
Maestro CLI reference: A complete list of all global options and subcommands.
If you are using WSL and encounter issues running tests, see the Troubleshooting page for additional guidance.
Maestro CLI features
The CLI serves as the central engine for multiple automation workflows. Whether you prefer using Maestro Studio or your own IDE, the CLI handles the execution against emulators, simulators or physical devices. With Maestro CLI you can:
Run Local Tests
Execute tests against a running emulator/simulator or physical device using the command maestro test flow.yaml.
Continuous Development
The Continuous Mode (maestro test -c) monitors your YAML test files for changes and automatically restarts the test upon saving.
Device Management
Create and launch specific emulator or simulator configurations with maestro start-device.
Scale to the Cloud
Upload your Flows to Maestro Cloud to run tests at scale across a variety of managed device configurations.
Debug Tools
Identification of selectors is simplified with commands like maestro hierarchy, which prints the current app’s view hierarchy directly to the terminal.
Core Features
Maestro is built on the philosophy of "embracing instability," providing a suite of features that move beyond traditional automation tools:
Feature
Description
Built-in Tolerance
Automatically handles network delays and UI flakiness by waiting for the screen to "settle" before proceeding.
Extensive Commands
A library of commands for UI interactions (tapOn, swipe), navigation (launchApp, openLink), and device control.
JavaScript Integration
Run JavaScript expressions directly from YAML to manage complex data or perform HTTP requests
Modularity
Create composable subflows that can be reused across multiple tests to keep your automation suite DRY (Don't Repeat Yourself).
Flow Recording
The maestro record command stitches screen recordings and test output into a shareable MP4 video.
AI Analysis
[Beta] Generate LLM-based analysis reports for UI and internationalization issues.
Next Step
Learn how to get started with Maestro accessing the How to install Maestro CLI guide.
Last updated