Skip to content

Bitrise Steps ​

The Device Cloud for Maestro step runs your Maestro flows on DeviceCloud from a Bitrise workflow. This page describes version 1.5.0 of the step. Where something is newer than 1.2.0, the version it arrived in is noted.

Set up the step ​

  1. Edit your workflow in Bitrise to add a new step.
  2. Search for 'Device Cloud for Maestro' and select the step.

Searching for the Device Cloud for Maestro step in Bitrise

  1. The step now appears in your workflow.

The Device Cloud for Maestro step added to a Bitrise workflow

  1. Populate the API key using a Bitrise secret and set any variables. Give the key CI: run tests only access, so a leaked secret can't read your other runs (see Key access). Most inputs correspond to a dcd cloud flag — see that reference for accepted values. Not every flag has an input: device matrices, for example, aren't available in the step.

The Device Cloud for Maestro step inputs in Bitrise

In bitrise.yml, a step that runs an Android build looks like this:

yaml
- device-cloud-for-maestro@1:
    inputs:
    - api_key: $DEVICE_CLOUD_API_KEY
    - app_file: $BITRISE_APK_PATH
    - workspace: .maestro
    - env_list: |-
        USERNAME=test@example.com
        PASSWORD=$TEST_PASSWORD

@1 runs the latest 1.x release of the step. Store the API key and any passwords as Bitrise secrets: Bitrise fills in $DEVICE_CLOUD_API_KEY and $TEST_PASSWORD before the step runs.

Inputs ​

The step runs from $BITRISE_SOURCE_DIR, so relative paths start there. An input left empty uses the default shown.

App and flows ​

InputKeyDefaultDescription
Device Cloud API Keyapi_key—Required. Your DeviceCloud API key, from a Bitrise secret.
App File Pathapp_file—Path to the app binary: an .apk, a simulator .app or .zip, or an Expo iOS .tar.gz.
App Binary IDapp_binary_id—ID of a binary you've already uploaded, used instead of app_file. Needs step 1.5.1 or later.
Expo App URLapp_url—Signed URL of an Expo iOS build (.tar.gz), used instead of app_file. The CLI downloads and extracts it. Expo's URLs expire after about an hour.
Workspace Folderworkspace—Required. Path to your flows folder, or to a single flow file, e.g. .maestro.
Include Tagsinclude_tags—Only run flows with these Maestro tags (comma-separated).
Exclude Tagsexclude_tags—Skip flows with these tags (comma-separated).
Exclude Flowsexclude_flows—Subfolders to leave out.
Config Fileconfigconfig.yaml in the flows folderPath to a custom Maestro config file.
Environment Variablesenv_list—Variables to pass into your flows, one KEY=VALUE per line. See Environment Variables.

Devices ​

For the devices and OS versions you can pass, and which combinations work, see Devices & OS Versions.

InputKeyDefaultDescription
Android Deviceandroid_devicepixel-10Android device, e.g. pixel-8.
Android API Levelandroid_api_level36Android API level, e.g. 34.
iOS Deviceios_deviceiphone-16iOS device, e.g. iphone-17.
iOS Versionios_version26Major iOS version, e.g. 18.
Device Localedevice_locale—E.g. de_DE. See Locale.
Device Orientationorientation0Android only. 0 (portrait) or 90 (landscape).
Google Playgoogle_playfalseAndroid only. Run on devices with Google Play.
Runner Typerunner_typedefaultdefault, cpu1, m1 or m4. m1 and m4 incur premium pricing. See Runner Types.
Render Enginerender_engine—Android only, from 1.3.0. lavapipe or swiftshader, the software renderer the emulator boots with on the default Android runner. Leave it empty to let DeviceCloud choose (swiftshader for apps built with Flutter, otherwise lavapipe).
Android No Snapshotandroid_no_snapshotfalseAndroid only. Force a cold boot. Already on for API 34 and later.
Maestro Chrome Onboardingmaestro_chrome_onboardingfalseAndroid only. See Chrome onboarding.
Show Crosshairsshow_crosshairsfalseAndroid only. Show crosshairs where the flow taps.
Disable Animationsdisable_animationsfalseTurn off device animations (Reduce Motion on iOS). See Animations.

Running the tests ​

InputKeyDefaultDescription
Test Run Namename—Name for the run in the console.
Maestro Versionmaestro_versionDeviceCloud's defaultSee Maestro Versions.
Retry Countretry0Retries on failure, up to 2. See Retry Strategies.
PriorityprioritynormalFrom 1.5.0. low, normal or high: which of your team's queued runs starts first. It never moves your runs ahead of other customers. See Run Priority.
Cancel Previous Runcancel_previousfalseFrom 1.4.0. Cancel the previous run's still-queued tests when this one starts. See Cancelling superseded runs.
Async ExecutionasyncfalseDon't wait for the results: the step passes once the run is submitted. See Async execution.
Dry Rundry_runfalseList the flows that would run without starting a run.
Ignore SHA Checkignore_sha_checkfalseUpload the binary even if the same file was uploaded before. Not recommended.

Reports and output ​

InputKeyDefaultDescription
Report Formatreport—junit or html. html-detailed and allure are deprecated, see Report formats.
JUnit Report Pathjunit_path./report.xmlWhere to save the JUnit report.
HTML Report Pathhtml_path./report.zipWhere to save the HTML report, a ZIP of the report and its files.
Allure Report Pathallure_path./report.htmlWhere to save the Allure report.
Download Artifactsdownload_artifacts—ALL or FAILED: download the logs, screenshots and videos as a ZIP. With the default artifacts_path, the step also unzips them into $BITRISE_DEPLOY_DIR.
Artifacts Pathartifacts_path./artifacts.zipWhere to save the artifacts ZIP.
JSON OutputjsonfalsePrint the results as JSON. The step still fails a failed run.
JSON File Outputjson_filefalseWrite the results to <upload_id>_dcd.json. See Pass or fail.
JSON File Namejson_file_name—Another name, or a relative path, for that file.
Debug ModedebugfalseVerbose CLI output.
Use Beta CLIuse_betafalseRun the beta CLI instead of the latest stable release.

GitHub checks and metadata ​

InputKeyDefaultDescription
Include GitHub Contextinclude_github_contexttrueFrom 1.4.0. Attach the build's GitHub context to the run, see GitHub context.
GitHub Check Namecheck_name—Names the GitHub check this run posts.
Metadatametadata—Extra key=value pairs for the run, one per line.

GitHub context ​

From 1.4.0, when your app's repository is on GitHub the step attaches the build's GitHub context to the run as metadata, read from Bitrise's environment: the repository (gh_repo), commit (gh_sha), branch (gh_branch) and, for pull request builds, the PR number and URL (gh_pr_number, gh_pr_url). That is what GitHub checks need, so there's nothing to add. Keys you set yourself in the Metadata input take precedence, and Include GitHub Context (include_github_context) set to false turns this off.

On 1.2.0 and 1.3.0 the step doesn't attach these. Add gh_repo=<owner/repo> and gh_sha=$BITRISE_GIT_COMMIT to the Metadata input, one per line, or no check is posted.

The GitHub Check Name input (check_name) names the check a run posts — iOS gives DeviceCloud / iOS. Set it when a commit is tested by more than one workflow, so each gets a check you can require separately in branch protection.

Outputs ​

OutputDescription
DEVICE_CLOUD_CONSOLE_URLURL to view the run in the DeviceCloud console.
DEVICE_CLOUD_UPLOAD_STATUSPASSED or FAILED once the run has finished, or PENDING, QUEUED or RUNNING if it hadn't (an async run reports whatever it had reached at submission). ERROR if the status couldn't be read. SUPERSEDED when a newer run replaced this one through cancel_previous; the step passes.
DEVICE_CLOUD_FLOW_RESULTSJSON array with one entry per flow: name, status and, for a failed flow, failReason.
DEVICE_CLOUD_APP_BINARY_IDID of the uploaded app binary. To reuse it in a later step through app_binary_id, you need step 1.5.1 or later.

Before 1.4.0 the status, flow results and binary ID outputs are empty; only the console URL is set.

Pass or fail ​

The step fails when the run fails. From 1.4.0 that also holds with JSON File Output (json_file) turned on, where the CLI itself exits 0: the step decides from the run's status instead. On earlier versions, leave json_file off if the step's result gates your workflow.

Cancelling superseded runs ​

From 1.4.0, to cancel the previous run's still-queued tests when a new build starts, set the Cancel Previous Run input (cancel_previous) to true — see Cancelling superseded runs. The step attaches the context this needs for a GitHub repository (see GitHub context) and the pipeline's ID as the run ID, so invocations in one pipeline don't cancel each other. For a repository hosted elsewhere, add gh_repo=<owner/repo> and gh_branch=$BITRISE_GIT_BRANCH to the Metadata input, one per line; without them nothing is cancelled. If one build runs the step more than once (iOS and Android, say), give each its own GitHub Check Name, or one platform's new run cancels the other's previous run.