/
step.yml
executable file
·322 lines (291 loc) · 17.1 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
title: "[BETA] Virtual Device Testing for Android"
summary: Run Android UI tests on physical devices
description: |-
Run Android UI tests on virtual devices. Available test types are instrumentation, robo, gameloop.
The minimal setup of this step would be to select test type. If you selected instrumentation, don't forget to set __Test APK path__
under the __Instrumentation Test__ group as well.
website: https://github.com/deliveryhero/steps-physical-device-testing-for-android
source_code_url: https://github.com/deliveryhero/steps-physical-device-testing-for-android
support_url: https://github.com/deliveryhero/steps-physical-device-testing-for-android/issues
host_os_tags:
- ubuntu
project_type_tags:
- android
type_tags:
- test
is_always_run: false
is_skippable: false
run_if: ".IsCI"
meta:
bitrise.io.addons.required: [{addon_id:"addons-firebase-testlab"}]
deps:
brew:
- name: go
apt_get:
- name: golang
bin_name: go
toolkit:
go:
package_name: github.com/deliveryhero/steps-physical-device-testing-for-android
inputs:
- apk_path: "$BITRISE_APK_PATH"
opts:
title: "APK path"
summary: |
The path to the APK you want the tests run with. By default `gradle-runner` step exports `BITRISE_APK_PATH` env, so you won't need to change this input.
description: |
The path to the APK you want the tests run with. By default `gradle-runner` step exports `BITRISE_APK_PATH` env, so you won't need to change this input.
is_required: true
- test_devices: "NexusLowRes,24,en,portrait"
opts:
title: "Test devices"
description: |
Format:
One device configuration per line and the parameters are separated with `,` in the order of: `deviceID,version,language,orientation`
For example:
`NexusLowRes,24,en,portrait`
`NexusLowRes,24,en,landscape`
Available devices and its versions:
```
┌───────────────────┬──────────┬─────────────────────────────────────┬─────────────┬───────────────────┬──────┐
│ MODEL_ID │ MAKE │ MODEL_NAME │ RESOLUTION │ OS_VERSION_IDS │ TAGS │
├───────────────────┼──────────┼─────────────────────────────────────┼─────────────┼───────────────────┼──────┤
│ Nexus10 │ Samsung │ Nexus 10 │ 2560 x 1600 │ 19,21,22 │ │
│ Nexus4 │ LG │ Nexus 4 │ 1280 x 768 │ 19,21,22 │ │
│ Nexus5 │ LG │ Nexus 5 │ 1920 x 1080 │ 19,21,22,23 │ │
│ Nexus5X │ LG │ Nexus 5X │ 1920 x 1080 │ 23,24,25,26 │ │
│ Nexus6 │ Motorola │ Nexus 6 │ 2560 x 1440 │ 21,22,23,24,25 │ │
│ Nexus6P │ Google │ Nexus 6P │ 2560 x 1440 │ 23,24,25,26,27 │ │
│ Nexus7 │ Asus │ Nexus 7 (2012) │ 1280 x 800 │ 19,21,22 │ │
│ Nexus7_clone_16_9 │ Generic │ Nexus7 clone, DVD 16:9 aspect ratio │ 1280 x 720 │ 23,24,25,26 │ beta │
│ Nexus9 │ HTC │ Nexus 9 │ 2048 x 1536 │ 21,22,23,24,25 │ │
│ NexusLowRes │ Generic │ Low-resolution MDPI phone │ 640 x 360 │ 23,24,25,26,27,28 │ │
│ Pixel2 │ Google │ Pixel 2 │ 1920 x 1080 │ 26,27,28 │ │
└───────────────────┴──────────┴─────────────────────────────────────┴─────────────┴───────────────────┴──────┘
```
summary: |
Format:
One device configuration per line and the parameters are separated with `,` in the order of: `deviceID,version,language,orientation`
For example:
`NexusLowRes,24,en,portrait`
`NexusLowRes,24,en,landscape`
Available devices and its versions:
```
┌───────────────────┬──────────┬─────────────────────────────────────┬─────────────┬───────────────────┬──────┐
│ MODEL_ID │ MAKE │ MODEL_NAME │ RESOLUTION │ OS_VERSION_IDS │ TAGS │
├───────────────────┼──────────┼─────────────────────────────────────┼─────────────┼───────────────────┼──────┤
│ Nexus10 │ Samsung │ Nexus 10 │ 2560 x 1600 │ 19,21,22 │ │
│ Nexus4 │ LG │ Nexus 4 │ 1280 x 768 │ 19,21,22 │ │
│ Nexus5 │ LG │ Nexus 5 │ 1920 x 1080 │ 19,21,22,23 │ │
│ Nexus5X │ LG │ Nexus 5X │ 1920 x 1080 │ 23,24,25,26 │ │
│ Nexus6 │ Motorola │ Nexus 6 │ 2560 x 1440 │ 21,22,23,24,25 │ │
│ Nexus6P │ Google │ Nexus 6P │ 2560 x 1440 │ 23,24,25,26,27 │ │
│ Nexus7 │ Asus │ Nexus 7 (2012) │ 1280 x 800 │ 19,21,22 │ │
│ Nexus7_clone_16_9 │ Generic │ Nexus7 clone, DVD 16:9 aspect ratio │ 1280 x 720 │ 23,24,25,26 │ beta │
│ Nexus9 │ HTC │ Nexus 9 │ 2048 x 1536 │ 21,22,23,24,25 │ │
│ NexusLowRes │ Generic │ Low-resolution MDPI phone │ 640 x 360 │ 23,24,25,26,27,28 │ │
│ Pixel2 │ Google │ Pixel 2 │ 1920 x 1080 │ 26,27,28 │ │
└───────────────────┴──────────┴─────────────────────────────────────┴─────────────┴───────────────────┴──────┘
```
is_required: true
- test_type: "robo"
opts:
title: "Test type"
summary: |
The type of your test you want to run on the devices. Find more properties below in the selected test type's group.
description: |
The type of your test you want to run on the devices. Find more properties below in the selected test type's group.
is_required: true
value_options:
- "instrumentation"
- "robo"
- "gameloop"
- app_package_id:
opts:
title: "App package ID"
summary: |
The Java package of the application under test (leave empty to get it extracted from the APK manifest).
description: |
The Java package of the application under test (leave empty to get it extracted from the APK manifest).
- test_apk_path: "$BITRISE_TEST_APK_PATH"
opts:
category: "Instrumentation Test"
title: "Test APK path"
summary: The path to the APK that contains instrumentation tests
description: The path to the APK that contains instrumentation tests
- inst_test_package_id:
opts:
category: "Instrumentation Test"
title: "Test package ID"
summary: The Java package name of the instrumentation test (leave empty to get it extracted from the APK manifest).
description: The Java package name of the instrumentation test (leave empty to get it extracted from the APK manifest).
- inst_test_runner_class:
opts:
category: "Instrumentation Test"
title: "Test runner class"
summary: The fully-qualified Java class name of the instrumentation test runner (leave empty to use the last name extracted from the APK manifest).
description: The fully-qualified Java class name of the instrumentation test runner (leave empty to use the last name extracted from the APK manifest).
- inst_test_targets:
opts:
category: "Instrumentation Test"
title: |
Test targets, seperated with the "," character.
summary: |
A list of one or more instrumentation test targets to be run (default: all targets). Each target must be fully qualified with the package name or class name, in one of these formats:
- `package package_name`
- `class package_name.class_name`
- `class package_name.class_name#method_name`
For example:
`class com.my.company.app.MyTargetClass,class com.my.company.app.MyOtherTargetClass`
description: |
A list of one or more instrumentation test targets to be run (default: all targets). Each target must be fully qualified with the package name or class name, in one of these formats:
- `package package_name`
- `class package_name.class_name`
- `class package_name.class_name#method_name`
For example:
`class com.my.company.app.MyTargetClass,class com.my.company.app.MyOtherTargetClass`
- inst_use_orchestrator: "false"
opts:
category: "Instrumentation Test"
title: "Use Orchestrator"
summary: |
The option of whether running each test within its own invocation of instrumentation with Android Test Orchestrator or not.
description: |
The option of whether running each test within its own invocation of instrumentation with Android Test Orchestrator or not.
is_required: true
value_options:
- "false"
- "true"
- robo_initial_activity:
opts:
category: "Robo Test"
title: "Initial activity"
summary: The initial activity used to start the app during a robo test. (leave empty to get it extracted from the APK manifest)
description: The initial activity used to start the app during a robo test. (leave empty to get it extracted from the APK manifest)
- robo_max_depth:
opts:
category: "Robo Test"
title: "Max depth"
summary: |
The maximum depth of the traversal stack a robo test can explore. Needs to be at least 2 to make Robo explore the app beyond the first activity(leave empty to use the default value: `50`)
description: |
The maximum depth of the traversal stack a robo test can explore. Needs to be at least 2 to make Robo explore the app beyond the first activity(leave empty to use the default value: `50`)
- robo_max_steps:
opts:
category: "Robo Test"
title: "Max steps"
summary: |
The maximum number of steps/actions a robo test can execute(leave empty to use the default value: `no limit`).
description: |
The maximum number of steps/actions a robo test can execute(leave empty to use the default value: `no limit`).
- robo_directives:
opts:
category: "Robo Test"
title: "Robo directives"
summary: |
To complete text fields in your app, use robo-directives and provide a comma-separated list of key-value pairs, where the key is the Android resource name of the target UI element, and the value is the text string. EditText fields are supported but not text fields in WebView UI elements.
For example, you could use the following parameter for custom login:
```
username_resource,username,ENTER_TEXT
password_resource,password,ENTER_TEXT
loginbtn_resource,,SINGLE_CLICK
```
One directive per line, the parameters are separated with `,` character. For example: `ResourceName,InputText,ActionType`
description: |
To complete text fields in your app, use robo-directives and provide a comma-separated list of key-value pairs, where the key is the Android resource name of the target UI element, and the value is the text string. EditText fields are supported but not text fields in WebView UI elements.
For example, you could use the following parameter for custom login:
```
username_resource,username,ENTER_TEXT
password_resource,password,ENTER_TEXT
loginbtn_resource,,SINGLE_CLICK
```
One directive per line, the parameters are separated with `,` character. For example: `ResourceName,InputText,ActionType`
- loop_scenarios:
opts:
category: "Game Loop Test"
title: "Loop scenarios"
- loop_scenario_labels:
opts:
category: "Game Loop Test"
title: "Loop scenario labels"
- test_timeout: 900
opts:
category: "Debug"
title: "Test timeout"
summary: |
The max time this test execution can run before it is cancelled. It does not include any time necessary to prepare and clean up the target device. The maximum possible testing time is 3600 seconds.
description: |
The max time this test execution can run before it is cancelled. It does not include any time necessary to prepare and clean up the target device. The maximum possible testing time is 3600 seconds.
- directories_to_pull:
opts:
category: "Debug"
title: "Directories to pull"
summary: |
A list of paths that will be downloaded from the device's storage after the test is complete.
For example
```
/sdcard/tempDir1
/data/tempDir2
```
If `download_test_results` input is set to `false` then these files will be downloaded to the dashboard only. To have them downloaded set that input to `true` as well.
description: |
A list of paths that will be downloaded from the device's storage after the test is complete.
For example
```
/sdcard/tempDir1
/data/tempDir2
```
If `download_test_results` input is set to `false` then these files will be available on the dashboard only. To have them downloaded set that input to `true` as well.
- environment_variables:
opts:
category: "Debug"
title: Environment Variables
summary: |
One variable per line, key and value seperated by `=`
For example:
```
coverage=true
coverageFile=/sdcard/tempDir/coverage.ec
```
description: |
One variable per line, key and value seperated by `=`
For example:
```
coverage=true
coverageFile=/sdcard/tempDir/coverage.ec
```
- download_test_results: "false"
opts:
category: "Debug"
title: "Download files"
summary: |
If this input is set to `true` all files generated in the test run and the files you downloaded from the device (if you have set `directories_to_pull` input as well) will be downloaded. Otherwise, no any file will be downloaded.
description: |
If this input is set to `true` all files generated in the test run and the files you downloaded from the device (if you have set `directories_to_pull` input as well) will be downloaded. Otherwise, no any file will be downloaded.
is_required: true
value_options:
- "false"
- "true"
- api_base_url: "https://vdt.bitrise.io/test"
opts:
title: "Test API's base URL"
summary: The URL where test API is accessible.
description: |
The URL where test API is accessible.
is_required: true
is_dont_change_value: true
- api_token: $ADDON_VDTESTING_API_TOKEN
opts:
title: "API Token"
summary: The token required to authenticate with the API.
description: |
The token required to authenticate with the API.
is_required: true
is_dont_change_value: true
is_sensitive: true
outputs:
- VDTESTING_DOWNLOADED_FILES_DIR:
opts:
title: "Downloaded files directory"
description: "The directory containing the downloaded files if you have set `directories_to_pull` and `download_test_results` inputs above."
summary: "The directory containing the downloaded files if you have set `directories_to_pull` and `download_test_results` inputs above."