Skip to content

Commit 44f019c

Browse files
authored
Merge pull request #32 from MarathonLabs/feature/maestro
feat: add maestro
2 parents 73549f3 + dd6fe6d commit 44f019c

16 files changed

Lines changed: 158 additions & 8 deletions

.github/workflows/ci.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,34 @@ jobs:
137137
with:
138138
name: output_ios
139139
path: output
140+
141+
check_simple_maestro_android:
142+
runs-on: ubuntu-latest
143+
steps:
144+
- name: Checkout repository
145+
uses: actions/checkout@v2
146+
- name: Run tests
147+
uses: ./
148+
with:
149+
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
150+
application: "example/maestro/android/wikipedia.apk"
151+
testApplication: "example/maestro/android/flows"
152+
platform: "maestro/android"
153+
name: "maestro_android_simple"
154+
version: "1.0.51"
155+
156+
check_simple_maestro_ios:
157+
runs-on: ubuntu-latest
158+
steps:
159+
- name: Checkout repository
160+
uses: actions/checkout@v2
161+
- name: Run tests
162+
uses: ./
163+
with:
164+
apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
165+
application: "example/maestro/ios/wikipedia.zip"
166+
testApplication: "example/maestro/ios/flows"
167+
platform: "maestro/ios"
168+
name: "maestro_ios_simple"
169+
version: "1.0.51"
170+

action.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ inputs:
1111
description: "Application binary path, e.g. apk file for Android or zip file of iOS Application"
1212
required: true
1313
testApplication:
14-
description: "Test application binary path, e.g. apk file for Android or zip file of iOS Test Runner app"
14+
description: "Test application binary path, e.g. apk file for Android or zip file of iOS Test Runner app or folder containing maestro flow"
1515
required: true
1616
platform:
17-
description: "Testing platform. Android or iOS only"
17+
description: "Testing platform. [Android,iOS,Maestro/Android,Maestro/iOS]"
1818
required: true
1919
osVersion:
20-
description: "Android or iOS OS version. For Android one of [10, 11, 12, 13, 14]. For iOS one of [16.4, 17.2]"
20+
description: "Android or iOS OS version. For Android one of [8.1, 9, 10, 11, 12, 13, 14, 15, 16]. For iOS one of [17.5, 18.2, 18.4]"
2121
required: false
2222
systemImage:
23-
description: "OS-specific system image. For Android one of [default,google_apis]. For iOS only [default]"
23+
description: "OS-specific system image. For Android one of [default,google_apis,google_apis_playstore]. For iOS only [default]"
24+
required: false
2425
link:
2526
description: "Link to commit"
2627
required: false
@@ -41,16 +42,15 @@ inputs:
4142
required: false
4243
wait:
4344
description: "Wait for test run to finish if true, exits after triggering a run if false. Defaults to true"
44-
default: "true"
4545
required: false
4646
name:
4747
description: "Name for run, for example it could be description of commit"
4848
required: false
4949
device:
50-
description: "Device type. For Android one of [phone, tv, watch]. For iOS one of [iPhone-14, iPhone-15]"
50+
description: "Device type. For Android one of [phone, tv, watch]. For iOS one of [iPhone-11, iPhone-15, iPhone-15-Pro, iPhone-15-Pro-Max, iPhone-16, iPhone-16-Plus, iPhone-16-Pro, iPhone-16-Pro-Max]"
5151
required: false
5252
xcodeVersion:
53-
description: "Xcode version. Only for iOS. Possible values: [14.3.1, 15.2]"
53+
description: "Xcode version. Only for iOS. Possible values: [15.4, 16.2, 16.3]"
5454
required: false
5555
xctestplanFilterFile:
5656
description: "Test filters supplied as .xctestplan file"
@@ -97,6 +97,12 @@ inputs:
9797
noRetries:
9898
description: "Disable all retries [possible values: true, false]"
9999
required: false
100+
maestroEnv:
101+
description: "maestro environment variables, format: 'MAESTRO_APP_ID=com.example,MAESTRO_OTHER_VAR=blahblah'"
102+
required: false
103+
flows:
104+
description: "maestro flows to execute, all the files specified should be inside the testApplication folder: 'flows/my-flow.yaml,flows/subfolder/flow.yaml'"
105+
required: false
100106
branding:
101107
color: purple
102108
icon: play-circle
@@ -108,7 +114,7 @@ runs:
108114
with:
109115
version: ${{ inputs.version }}
110116
- name: Run tests using marathon-cloud
111-
uses: MarathonLabs/action-invoke@1.0.14
117+
uses: MarathonLabs/action-invoke@1.0.15
112118
with:
113119
apiKey: ${{ inputs.apiKey }}
114120
application: ${{ inputs.application }}
@@ -141,3 +147,5 @@ runs:
141147
retryQuotaTestPreventive: ${{ inputs.retryQuotaTestPreventive }}
142148
retryQuotaTestReactive: ${{ inputs.retryQuotaTestReactive }}
143149
noRetries: ${{ inputs.noRetries }}
150+
maestroEnv: ${{ inputs.maestroEnv }}
151+
flows: ${{ inputs.flows}}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
appId: org.wikipedia
2+
tags:
3+
- android
4+
- passing
5+
- advanced
6+
---
7+
- runFlow: subflows/onboarding-android.yaml
8+
- tapOn:
9+
id: "org.wikipedia:id/search_container"
10+
- tapOn:
11+
text: "Non existent view"
12+
optional: true
13+
- runScript: scripts/getSearchQuery.js
14+
- inputText: ${output.result}
15+
- assertVisible: ${output.result}
16+
- runFlow: subflows/launch-clearstate-android.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
appId: org.wikipedia
2+
tags:
3+
- android
4+
- passing
5+
---
6+
- launchApp
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
appId: org.wikipedia
2+
tags:
3+
- android
4+
- passing
5+
---
6+
- launchApp
7+
- assertVisible: "Doesn't exist"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
output.result = 'qwerty';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
appId: org.wikipedia
2+
---
3+
- launchApp:
4+
clearState: true
5+
- assertVisible: "Continue"
6+
- assertVisible: "Skip"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
appId: org.wikipedia
2+
---
3+
- launchApp:
4+
clearState: true
5+
- tapOn:
6+
text: "Non existent view"
7+
optional: true
8+
- tapOn:
9+
id: "org.wikipedia:id/fragment_onboarding_forward_button"
10+
- tapOn:
11+
id: "org.wikipedia:id/fragment_onboarding_forward_button"
12+
- tapOn:
13+
id: "org.wikipedia:id/fragment_onboarding_forward_button"
14+
- tapOn:
15+
id: "org.wikipedia:id/fragment_onboarding_done_button"
14.9 MB
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
appId: org.wikimedia.wikipedia
2+
tags:
3+
- ios
4+
- passing
5+
- advanced
6+
---
7+
- runFlow: subflows/onboarding-ios.yaml
8+
9+
# Dismiss the auth modal if visible
10+
- runFlow:
11+
when:
12+
visible: "You have been logged out"
13+
commands:
14+
- tapOn:
15+
text: "Continue without logging in"
16+
- tapOn:
17+
text: "Non existent view"
18+
optional: true
19+
- tapOn: Search Wikipedia
20+
- runScript: scripts/getSearchQuery.js
21+
- inputText: ${output.result}
22+
- eraseText
23+
- inputText: qwerty
24+
- assertVisible: ${output.result}
25+
- runFlow: subflows/launch-clearstate-ios.yaml

0 commit comments

Comments
 (0)