{% hint style="info" %} 🚀 Cloud Plan required - get started for free at maestro.dev {% endhint %}
In order to use the Maestro Cloud Pipe to run Maestro tests in the cloud, you'll need to add the API key and project IDs as secret environment variables in your Bitbucket repository.
- Go to your Repository -> Repository settings -> Repository Variables
- Save your API Key and project id as a secured env variables
Create a .maestro/
directory at the root of your repository and commit your Flows there:
<root>
├── .maestro/
│ ├── Login.yaml
│ ├── Add to Cart.yaml
│ └── Search.yaml
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
Once everything is setup, you can integrate the Maestro Cloud Upload Pipe in your Pipeline build process.
Edit your bitbucket-pipelines.yml
and add an extra step after your app has finished building.
Note: All file paths are relative to the repository source root.
script:
- pipe: mobiledevinc/maestro-cloud-upload:1.0.0
variables:
MDEV_API_KEY: $MDEV_API_KEY
MDEV_PROJECT_ID: $MDEV_PROJECT_ID
MDEV_APP_FILE: app/build/outputs/apk/debug/app-debug.apk
script:
- pipe: mobiledevinc/maestro-cloud-upload:1.0.0
variables:
MDEV_API_KEY: $MDEV_API_KEY
MDEV_PROJECT_ID: $MDEV_PROJECT_ID
MDEV_APP_FILE: <app_name>.app
The pipe will:
- Upload your app and flows to be run on Maestro's enterprise-grade cloud infrastructure
- Wait for flows to complete (can be configured)
- Complete with fail/pass depending on flow results
For more information and configurations, checkout Maestro Cloud Upload Pipe.