You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cloud/intro/maestro.md
+50-5Lines changed: 50 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,26 @@ import TabItem from '@theme/TabItem';
6
6
### Supported platforms
7
7
Marathon Cloud supports Maestro for iOS and Android.
8
8
9
+
**Important Notes on Test execution**:
10
+
- all file paths within your Maestro flows must use Linux-style syntax (e.g., path/to/file.yaml)
11
+
- each Maestro flow is treated as a separate test by Marathon Cloud
12
+
- sequential flow logic is not supported, as it conflicts with Marathon's design to complete all tests in under 15 minutes.
13
+
14
+
9
15
To execute your tests, use the command below:
10
16
<TabsgroupId="operating-systems">
11
17
<TabItemvalue="iOS"label="iOS">
12
18
13
19
```shell
14
20
export MARATHON_CLOUD_API_KEY=generated_api_key
15
-
marathon-cloud run maestro ios -a your_application.app -t ./path/to/tests --maestro-env=MAESTRO_APP_ID=your.app.id folder_or_file_to_execute
21
+
marathon-cloud run maestro ios --application your_application.app --test-application ./path/to/tests folder_or_file_to_execute
16
22
```
17
23
</TabItem>
18
24
<TabItemvalue="Android"label="Android">
19
25
20
26
```shell
21
27
export MARATHON_CLOUD_API_KEY=generated_api_key
22
-
marathon-cloud run maestro android -a your_app.apk -t ./path/to/tests --maestro-env=MAESTRO_APP_ID=your.app.id folder_or_file_to_execute
28
+
marathon-cloud run maestro android --application your_app.apk --test-application ./path/to/tests folder_or_file_to_execute
23
29
24
30
```
25
31
</TabItem>
@@ -30,9 +36,48 @@ Here's a breakdown of the variables and flags used in the example:
30
36
- ./path/to/tests - the root directory containing all your Maestro test files
31
37
- folder_or_file_to_execute - a space-separated list of specific folders and files you want to run within the test directory. **Note:** Marathon Cloud does not execute tests from subfolders when a folder is specified.
32
38
For iOS:
33
-
- -a your_application.app - path to the [iOS application](/intro/ios#application-and-test-application)
39
+
- --application your_application.app - path to the [iOS application](/intro/ios#application-and-test-application)
34
40
For Android:
35
-
- -a your_app.apk - path to the [Android application](/intro/android#application-and-test-application)
36
-
- --maestro-env=MAESTRO_APP_ID=your.app.id - This optional flag allows you to pass environment variables to your Maestro tests. It is required if your test flow uses a variable like appId: ${MAESTRO_APP_ID}. Replace your.app.id with the actual bundle ID for your application.
41
+
- --application your_app.apk - path to the [Android application](/intro/android#application-and-test-application)
42
+
43
+
### Maestro environment variables
44
+
If your Maestro tests rely on environment variables, you'll need to pass them to Marathon Cloud.
45
+
A common use case is referencing the application ID in a test flow, as shown in this example:
46
+
```shell
47
+
# flow.yaml
37
48
49
+
appId: ${APP_ID}
50
+
---
51
+
- launchApp
52
+
- tapOn: "Text on the screen"
53
+
```
54
+
To provide the value for **APP_ID**, use the **--maestro-env** flag. For instance, to set **APP_ID** to **your.app.id**, you would execute the following command:
55
+
```shell
56
+
export MARATHON_CLOUD_API_KEY=generated_api_key
57
+
marathon-cloud run maestro android --application your_app.apk --test-application ./path/to/tests --maestro-env=APP_ID=your.app.id folder_or_file_to_execute
38
58
59
+
```
60
+
61
+
### Maestro filtering
62
+
For more granular control over which tests run, you can use Maestro's tag-based filtering in addition to the recommended practice of organizing tests into folders.
63
+
This filtering feature lets you define which tests to include (allowlist) and which to exclude (blocklist) using specific tags.
64
+
65
+
create a YAML file (e.g., filter.yaml) that specifies your filtering configuration. The example below shows how to define tags to allow or block:
66
+
```shell
67
+
filteringConfiguration:
68
+
allowlist:
69
+
- type: "annotation"
70
+
values:
71
+
- "tag1"
72
+
- "tag2"
73
+
blocklist:
74
+
- type: "annotation"
75
+
values:
76
+
- "tag3"
77
+
- "tag4"
78
+
```
79
+
Next, pass this filter file to your Marathon Cloud command using the **--filter-file** flag. Here is how your full command would look:
0 commit comments