Manage secrets

Pass sensitive parameters like usernames and passwords to Maestro Cloud tests via environment variables using the -e CLI option.

Avoid storing sensitive values directly in your Flow files. Maestro allows you to pass parameters as environment variables during execution.

circle-info

Maestro Cloud Plan required Secret management via environment variables is available on the Maestro Cloud Planarrow-up-right.

Define environment variables

You can provide environment variables using the Maestro CLI or through CI integrations like GitHub Actions.

Use the -e option to pass parameters as key-value pairs:

maestro cloud \
  --api-key "<YOUR_API_KEY>" \
  --project-id "<YOUR_PROJECT_ID>" \
  -e USERNAME=$TEST_USERNAME \
  -e PASSWORD=$TEST_PASSWORD \
  --app-file "<APP_FILE>" \
  --flows "<FLOW_OR_FOLDER>"
circle-info

For more information about how to use parameters and constants in your Flow, access the documentation.

Use variables in your Flows

Once defined, reference these variables in your Flow files using the ${VARIABLE_NAME} syntax:

appId: com.example.app
---
- launchApp
- inputText: ${USERNAME}
- tapOn: Next
- inputText: ${PASSWORD}
- tapOn: Login

Last updated