-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
ui-tests.yml
208 lines (200 loc) · 9.45 KB
/
ui-tests.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
parameters:
androidPool: { }
iosPool: { }
windowsPool: { }
macosPool: { }
androidCompatibilityPool: { }
iosCompatibilityPool: { }
androidApiLevels: [ 30 ]
iosVersions: [ 'latest' ]
provisionatorChannel: 'latest'
agentPoolAccessToken: ''
runCompatibilityTests: false
projects:
- name: name
desc: Human Description
android: /optional/path/to/android.csproj
ios: /optional/path/to/ios.csproj
winui: /optional/path/to/winui.csproj
mac: /optional/path/to/mac.csproj
app: /optional/path/to/app.csproj
compatibilityAndroidApp: /optional/path/to/app.csproj
compatibilityAndroidTestProject: /optional/path/to/android.csproj
compatibilityiOSTestProject: /optional/path/to/ios.csproj
compatibilityiOSApp: /optional/path/to/app.csproj
stages:
- stage: android_ui_tests
displayName: Android UITests
dependsOn: []
jobs:
- ${{ each project in parameters.projects }}:
- ${{ if ne(project.android, '') }}:
- ${{ each api in parameters.androidApiLevels }}:
- ${{ if not(containsValue(project.androidApiLevelsExclude, api)) }}:
- job: android_ui_tests_${{ project.name }}_${{ api }}
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
workspace:
clean: all
displayName: ${{ coalesce(project.desc, project.name) }} (API ${{ api }})
pool: ${{ parameters.androidPool }}
variables:
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
steps:
- template: ui-tests-steps.yml
parameters:
platform: android
version: ${{ api }}
path: ${{ project.android }}
app: ${{ project.app }}
${{ if eq(api, 27) }}:
device: android-emulator-32_${{ api }}
${{ if not(eq(api, 27)) }}:
device: android-emulator-64_${{ api }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}
- stage: ios_ui_tests
displayName: iOS UITests
dependsOn: []
jobs:
- ${{ each project in parameters.projects }}:
- ${{ if ne(project.ios, '') }}:
- ${{ each version in parameters.iosVersions }}:
- ${{ if not(containsValue(project.iosVersionsExclude, version)) }}:
- job: ios_ui_tests_${{ project.name }}_${{ replace(version, '.', '_') }}
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
workspace:
clean: all
displayName: ${{ coalesce(project.desc, project.name) }} (v${{ version }})
pool: ${{ parameters.iosPool }}
variables:
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
steps:
- template: ui-tests-steps.yml
parameters:
platform: ios
${{ if eq(version, 'latest') }}:
version: 16.4
${{ if ne(version, 'latest') }}:
version: ${{ version }}
path: ${{ project.ios }}
app: ${{ project.app }}
${{ if eq(version, 'latest') }}:
device: ios-simulator-64
${{ if ne(version, 'latest') }}:
device: ios-simulator-64_${{ version }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}
# - stage: winui_ui_tests
# displayName: WinUI UITests
# dependsOn: []
# jobs:
# - ${{ each project in parameters.projects }}:
# - ${{ if ne(project.winui, '') }}:
# - job: winui_ui_tests_${{ project.name }}
# timeoutInMinutes: 240 # how long to run the job before automatically cancelling
# workspace:
# clean: all
# displayName: ${{ coalesce(project.desc, project.name) }}
# pool: ${{ parameters.windowsPool }}
# steps:
# - template: ui-tests-steps.yml
# parameters:
# platform: windows
# version: "10.0.19041"
# device: windows10
# path: ${{ project.winui }}
# app: ${{ project.app }}
# provisionatorChannel: ${{ parameters.provisionatorChannel }}
# agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}
- stage: mac_ui_tests
displayName: macOS UITests
dependsOn: []
jobs:
- ${{ each project in parameters.projects }}:
- ${{ if ne(project.mac, '') }}:
- job: mac_ui_tests_${{ project.name }}
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
workspace:
clean: all
displayName: ${{ coalesce(project.desc, project.name) }}
pool: ${{ parameters.macosPool }}
variables:
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
steps:
- template: ui-tests-steps.yml
parameters:
platform: catalyst
version: "13.1"
device: mac
path: ${{ project.mac }}
app: ${{ project.app }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}
- ${{ if eq(parameters.runCompatibilityTests, true) }}:
- stage: android_compatibility_ui_tests
displayName: Android Compatibility UITests
dependsOn: []
jobs:
- ${{ each project in parameters.projects }}:
- ${{ if ne(project.android, '') }}:
- ${{ each api in parameters.androidApiLevels }}:
- ${{ if not(containsValue(project.androidApiLevelsExclude, api)) }}:
- job: android_compatibility_ui_tests_${{ project.name }}_${{ api }}
timeoutInMinutes: 240
workspace:
clean: all
displayName: ${{ coalesce(project.desc, project.name) }} (API ${{ api }})
pool: ${{ parameters.androidCompatibilityPool }}
variables:
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
steps:
- template: ui-tests-compatibility-steps.yml
parameters:
platform: android
provisionPlatform: macos
configuration: Debug
version: ${{ api }}
path: ${{ project.compatibilityAndroidTestProject }}
app: ${{ project.compatibilityAndroidApp }}
targetSample: "dotnet-legacy-controlgallery-android"
${{ if eq(api, 27) }}:
DEVICE: android-emulator-32_${{ api }}
${{ if not(eq(api, 27)) }}:
DEVICE: android-emulator-64_${{ api }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}
- stage: ios_compatibility_ui_tests
displayName: iOS Compatibility UITests
dependsOn: []
jobs:
- ${{ each project in parameters.projects }}:
- ${{ if ne(project.ios, '') }}:
- ${{ each version in parameters.iosVersions }}:
- ${{ if not(containsValue(project.iosVersionsExclude, version)) }}:
- job: ios_compatibility_ui_tests_${{ project.name }}_${{ replace(version, '.', '_') }}
timeoutInMinutes: 240
workspace:
clean: all
displayName: ${{ coalesce(project.desc, project.name) }} (v${{ version }})
pool: ${{ parameters.iosCompatibilityPool }}
variables:
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
steps:
- template: ui-tests-compatibility-steps.yml
parameters:
platform: ios
provisionPlatform: macos
configuration: Debug
${{ if eq(version, 'latest') }}:
version: 16.2
${{ if ne(version, 'latest') }}:
version: ${{ version }}
path: ${{ project.compatibilityiOSTestProject }}
app: ${{ project.compatibilityiOSApp }}
targetSample: "dotnet-legacy-controlgallery-ios"
${{ if eq(version, 'latest') }}:
device: ios-simulator-64
${{ if ne(version, 'latest') }}:
device: ios-simulator-64_${{ version }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}