Open paulsweeting opened 1 month ago
Hi @paulsweeting, thanks for creating the issue and sorry for the problems.
Could you share a simple, example flows just so that we can reproduce this easily?
@bartekpacia - Yeap, I'm just using the out of the box example flows when you run maestro download-samples
appId: org.wikipedia
tags:
- advanced
---
- runFlow: subflows/onboarding-android.yaml
- tapOn:
id: "org.wikipedia:id/search_container"
- runScript: scripts/getSearchQuery.js
- inputText: ${output.result}
- assertVisible: ${output.result}
Thanks for the report, I confirm it occurs.
Error message in code:
Looks like this is expected behavior. When using subflows, you have to upload the whole workspace. This is explained in the docs here:
I agree a better job should be done here, to inform users about this. Maestro CLI should maybe say:
Your flow includes a subflow. To run on Maestro Cloud, you need to upload the whole workspace instead:
<example invocation>
See also:
Thank you @bartekpacia I can confirm that following works and runs all flows in the samples folder
maestro cloud samples/sample.zip samples
However, we want to be able to run single advanced flows. All of our tests use subflows. When writing a new test, we'd like the ability to run the test via the maestro cloud
CLI to confirm it runs and passes before raising the PR, where all tests run as part of GitHub actions.
For example, using the samples, we want to be able to run:
maestro cloud samples/sample.zip samples/ios-advanced-flow.yaml
Which currently gives the same error:
Upload request failed (400): Syntax error: Failed to parse file: /./ios-advanced-flow.yaml
Flow file does not exist: jar:file:///tmpFiles/workspaces/workflow17464117397033909285.zip!/./subflows/onboarding-ios.yaml
From what you've said this isn't possible at the moment. Is there a feature request open for this already? Or any suggested workarounds?
No, afaik, it's not possible as well right now. I see why you need this. Sorry for the problems.
Is there a feature request open for this already?
Let's consider this issue to be a feature request.
Just an update for anyone looking for a workaround. To run single advanced flow you can use tags. For example, add the tag 'single-test-run
' to the flow:
appId: org.wikimedia.wikipedia
tags:
- advanced
- single-test-run
Then pass the tag through using --include-tags
maestro cloud samples/sample.zip samples --include-tags=single-test-run
Which runs the single flow:
[Passed] ios-advanced-flow (1m 21s)
1/1 Flow Passed
Describe the bug Upload requests fail to maestro cloud when using the CLI if the test contains sub-flows:
- runFlow: subflows/onboarding-android.yaml
To Reproduce Follow https://cloud.mobile.dev/getting-started/quickstart in login into CLI and download samples
maestro download-samples
cd ./samples
maestro cloud sample.zip ios-advanced-flow.yaml
ormaestro cloud sample.apk android-advanced-flow.yaml
Expected behavior It works as expected with simple flows that do NOT contain subflow e.g.
maestro cloud sample.zip ios-flow.yaml
Environment information (please complete the following information):