runFlow
Last updated
Was this helpful?
Last updated
Was this helpful?
If you'd like to avoid duplication of code or otherwise modularize your Flow files, you can use the runFlow
command to run commands from another file.
Runs a flow from a specified file:
Let's say you have a login sequence that you'd like to reuse across multiple flows. You can write the login commands in a separate file and run those steps from another Flow:
runFlow
command can accepts arguments that will be passed to subflow, the same way as with -e
or env
block in the flow itself (see ):
If you would like to use runFlow
without extracting the commands into a separate flow file, you can run your commands inline like this:
Remember that when running in the cloud and requiring another file, you must specify a folder on the command line not just the flow file, e.g. maestro cloud myApp.apk ./myTestsFolder
else Maestro won't have the files required to run your tests, and you'll receive a 'Failed to parse file' error.