LogoLogo
🚀 Run Maestro tests in the cloud →
  • Home
  • Star us on GitHub
  • Getting Started
    • What is Maestro?
    • Installing Maestro
      • macOS
      • Windows
      • Linux
    • Build and Install your App
      • Android
      • iOS
    • Run a Sample Flow
    • Writing Your First Flow
    • Maestro Studio
    • Running Flows on CI
  • Cloud
    • Run Maestro tests in the cloud
    • Cloud Quickstart
    • CI Integration
      • GitHub Actions
        • Maestro GitHub Action for Android
        • Maestro GitHub Action for iOS
        • Maestro GitHub Action for Flutter
      • Bitrise
      • Bitbucket Pipelines
      • CircleCI
      • Integration with any CI platform
    • Pull Request Integration
    • Cloud Reference
      • Build your app for the cloud
      • Configuring OS Version
      • Configuring device locale
      • Device timezones
      • Email Notifications
      • Slack Notifications
      • Webhook Integration
      • Managing Secrets
      • Limits
      • Reusing App Binary
      • IP Allowlist
      • System Status
  • Platform Support
    • Supported Platforms
    • Android - Views
    • Android - Jetpack Compose
    • iOS - UIKit
    • iOS - SwiftUI
    • React Native
    • Flutter
    • Web Views
    • Web (Desktop Browser)
  • Examples
    • Android contacts flow automation
    • Facebook signup flow automation
    • Advanced: Wikipedia Android
    • Page Object Model
  • CLI
    • Cloud
    • Test Suites & Reports
    • Tags
    • Record Your Flow
    • Continuous Mode
    • View Hierarchy
    • Start Device
  • API Reference
    • Commands
      • addMedia
      • assertVisible
      • assertNotVisible
      • assertTrue
      • assertWithAI
      • assertNoDefectsWithAi
      • back
      • clearKeychain
      • clearState
      • copyTextFrom
      • evalScript
      • eraseText
      • extendedWaitUntil
      • extractTextWithAI
      • hideKeyboard
      • inputText
      • killApp
      • launchApp
      • openLink
      • pressKey
      • pasteText
      • repeat
      • retry
      • runFlow
      • runScript
      • scroll
      • scrollUntilVisible
      • setAirplaneMode
      • setLocation
      • startRecording
      • stopApp
      • stopRecording
      • swipe
      • takeScreenshot
      • toggleAirplaneMode
      • tapOn
      • doubleTapOn
      • longPressOn
      • travel
      • waitForAnimationToEnd
    • Common command arguments
    • Selectors
    • Configuration
      • Workspace configuration
      • Flow configuration
      • AI configuration
  • Advanced
    • Nested Flows
    • Wait
    • Loops
    • Conditions
    • Parameters & Constants
    • JavaScript
      • Run JavaScript
      • Outputs
      • Logging
      • Access element text
      • Make HTTP requests
      • GraalJS support
      • JavaScript announcement blog
    • Specify a Device
    • Configure Permissions
    • Detect Maestro in your app
    • Configure Maestro driver timeout
    • onFlowStart / onFlowComplete hooks
    • Test in different locales
    • Structuring your test suite
  • Troubleshooting
    • Known Issues
    • Frequently Asked Questions
    • Bug Report
    • Rollback Maestro
    • Debug Output
    • HOWTOs
      • Arrange your repository for Maestro tests
      • scrollUntilVisible for fragments
  • Community
    • Contributions
    • Articles & Tutorials
    • Case Studies
    • Resources
Powered by GitBook

Read to wire into CI or scale up your testing?

  • Run Maestro tests in the cloud →
On this page
  • Prerequisites
  • 1. Organize your Flows
  • 2. Run Flows in the cloud
  • 3. Detect Flow Failures
  • 4. View Result Details

Was this helpful?

Edit on GitHub
  1. Cloud
  2. CI Integration

Integration with any CI platform

PreviousCircleCINextPull Request Integration

Last updated 16 days ago

Was this helpful?

🚀 Cloud Plan required - get started for free at

You can use the Maestro CLI to run your Flows in the cloud from any CI platform.

Prerequisites

API Key

Reach out to your mobile.dev representative to obtain your Maestro API key

Project ID

The id of the project you want to upload your app and Flows to. You can retrieve this from the Maestro console.

iOS

Provide a path that points to an x86-compatible *.app simulator build directory, or a zipped file that contains the *.app build.

Android

You APK must be x86-compatible.

1. Organize your Flows

Add all of your Flows under a single directory in your repo. We recommend naming this directory .maestro/ as this is the naming convention our native integrations expect by default. (Note the "." at the beginning of .maestro/)

<root>
├── .maestro/
│   ├── Login.yaml
│   ├── Add to Cart.yaml
│   └── Search.yaml

All of the flows directly under the .maestro/ directory will be executed as top-level flows.

Subflows

It's common to have some Flow files that are only meant to be executed as part of another Flow via the runFlow command. These "subflows" can be nested under a subdirectory to prevent them from running as a top-level Flow.

<root>
├── .maestro/
│   ├── subflows/
│   │   └── MySubflow.yaml
│   ├── Login.yaml
│   ├── Add to Cart.yaml
│   └── Search.yaml

In the example above, MySubflow.yaml will not be executed as a top-level Flow, but still can be referenced by other Flows using the runFlow command.

2. Run Flows in the cloud

1. Install the Maestro CLI

curl -Ls "https://get.maestro.mobile.dev" | bash

2. Run the "maestro cloud" command

Add a step in your CI workflow that executes the maestro cloud command:

maestro cloud --apiKey <apiKey> --project-id <projectId> <appFile> .maestro/

<apiKey>

Maestro API Key

<projectId>

Maestro Project ID

<appFile>

.maestro/

The directory that contains your Flows

To set a name for your upload, use the --name option:

maestro cloud --apiKey <apiKey> --project-id <projectId> --name <uploadName> <appFi

Note that you can also define your API key as an environment variable in your shell with the name MAESTRO_CLOUD_API_KEY and Maestro will automatically read it for you

3. Detect Flow Failures

The maestro cloud command and our native CI integrations will wait for your Flows to finish executing before returning.

If any Flow failures are detected, the exit code is set to 1. On success, the exit code will be set to 0. This allows you to leverage any existing test alerting you have in place.

4. View Result Details

A link to the current upload will be printed out to your logs. You can view any ongoing or past uploads in the Maestro console.

First, ensure that the on your CI machine:

The APK file or .app directory ()

maestro.dev
Maestro CLI is installed
instructions