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:
Copy maestro cloud \
-e USERNAME=$TEST_USERNAME \
-e PASSWORD=$TEST_PASSWORD \
<appFile> .maestro/
Parameters are provided as multiline env
field
Copy - uses : mobile-dev-inc/action-maestro-cloud@v1.1.0
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:
Copy {
"benchmarkName" : "Benchmark name" ,
"env" : {
"USERNAME" : "<Username goes here>" ,
"PASSWORD" : "<Password goes here>"
}
}
Using variables in your flows
Copy appId: your.app.id
---
- launchApp
- inputText: ${USERNAME}
- tapOn: Next
- inputText: ${PASSWORD}