Managing Secrets
There might be cases where you don't want to store certain values in a flow file itself (i.e. user name, password, etc.). Maestro solves that by taking such parameters as variables and so does Maestro Cloud.
Maestro CLI
Github Action
API
Pass in parameters using the
-e
option:maestro cloud \
-e USERNAME=$TEST_USERNAME \
-e PASSWORD=$TEST_PASSWORD \
<appFile> .maestro/
Parameters are provided as multiline
env
field- uses: mobile-dev-inc/action-maestro-[email protected]
with:
api-key: ${{ secrets.MOBILE_DEV_API_KEY }}
app-file: <path to APK or iOS Simulator build>
env: |
USERNAME=${{ secrets.TEST_USERNAME }}
PASSWORD=${{ secrets.TEST_PASSWORD }}
If you have been following the Quickstart guide, all you would need to change is to pass an
env
field alongside your request object:{
"benchmarkName": "Benchmark name",
"env": {
"USERNAME": "<Username goes here>",
"PASSWORD": "<Password goes here>"
}
}
Once you have defined the variables, you can refer to them in your flows:
appId: your.app.id
---
- launchApp
- inputText: ${USERNAME}
- tapOn: Next
- inputText: ${PASSWORD}
Last modified 4mo ago