Maestro Flows overview

Maestro Flows are YAML-based test scripts that define user journeys for UI automation.

Maestro Flows are the fundamental building blocks of UI automation, representing specific segments of a user journey, such as Login, Checkout, or Search for an item, within an application. Flows can represent complete user journeys or discrete functional components that can be composed into larger test scenarios. By modeling real-world user interactions, Flows provide a reliable, repeatable way to verify app behavior across Android, iOS, and Web platforms from a single suite.

The anatomy of a Flow

Flows use a human-readable YAML format designed to be maintained by both developers and manual testers without heavy programming knowledge.

A standard Flow consists of two distinct parts separated by three dashes (---):

  • Configuration Section: Defined at the top (above the --- marker), this includes the appId of the app under test, along with optional metadata like name, tags, and environment variables.

  • Commands Section: A sequence of declarative commands, such as tapOn and inputText, that simulate user actions and validate the UI state.

# --- Configuration Section ---
appId: com.example.app         # Mandatory: Define the ID of the app under test
name: My Login Flow            # Optional: Customize the Flow name
tags:                          # Optional: Filter which tests to run
  - smoke-test
env:                           # Optional: Map of environment variables
  USERNAME: "[email protected]"

---
# --- Commands Section ---
- launchApp                    # Launches the application
- tapOn: "Username"            # Interacts with the username field
- inputText: ${USERNAME}       # Inputs the environment variable
- tapOn: "Login"               # Taps the login button
- assertVisible: "Welcome"     # Verifies success message appears

Explore Flows capabilities

Next step

Learn how to build resilient, intelligent journeys by mastering Flow control and logic.

Last updated