-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.sds.daily.yml
183 lines (164 loc) · 7.2 KB
/
azure-pipelines.sds.daily.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
trigger: none
pr: none
schedules:
- cron: '0 19 * * 1,2,3,4,5'
displayName: Daily build
always: true
branches:
include:
- master
parameters:
- name: runUITests
displayName: Run UI Tests
type: boolean
default: true
- name: runA11yTests
displayName: Run Accessibility Tests
type: boolean
default: true
- name: runOnSaucelabs
displayName: Run on SauceLabs
type: boolean
default: true
- name: runHeadlessBrowser
displayName: Run Headless Browser (Required for PR environments)
type: boolean
default: false
- name: adminWebOverrideUrl
displayName: Admin Web URL Override (leave blank for default)
type: string
default: ' ' # Optional parameter with default value
- name: videoWebOverrideUrl
displayName: Video Web URL Override (leave blank for default)
type: string
default: ' ' # Optional parameter with default value
- name: bookingsApiOverrideUrl
displayName: Bookings API PR Url (leave blank for default)
type: string
default: ' '
- name: videoApiOverrideUrl
displayName: Video API PR Url (leave blank for default)
type: string
default: ' '
- name: userApiOverrideUrl
displayName: User API PR Url (leave blank for default)
type: string
default: ' '
- name: environment
displayName: Environment name (used by to get the correct configuration from LaunchDarkly and KeyVault)
type: string
default: Dev
values:
- Dev
- Demo
- Test
- Stg
- name: testCategories
type: object
default:
- admin
- video
name: ${{ parameters.environment }}_UI_Daily_Tests_$(Date:yyyyMMdd)$(Rev:.r)
pool:
name: 'VH Self Hosted'
stages:
####################################################
# UI Testing. ######################################
- stage: Automation_Tests_${{ parameters.environment }}
displayName: Automation Tests ${{ parameters.environment }}
jobs:
- ${{ if eq(parameters.runUITests, true) }}:
- ${{ each testCategory in parameters.testCategories }}:
- job: UI_Tests_${{ testCategory }}
cancelTimeoutInMinutes: 80
displayName: UI Tests ${{ parameters.environment }} - ${{ testCategory }}
variables:
- name: SystemConfiguration.EnvironmentConfigSettings.EnableAccessibilityCheck
value: false
- template: variables/${{ lower(parameters.environment) }}.yaml
- template: variables/shared.yaml
parameters:
environment: ${{ parameters.environment }}
runOnSauceLabs: ${{ parameters.runOnSaucelabs }}
runHeadlessBrowser: ${{ parameters.runHeadlessBrowser }}
- group: vh-automation-test-${{ parameters.environment }}
- group: FeatureFlags_${{ parameters.environment }}
- group: Saucelabs
- group: VodafoneConfiguration_${{ parameters.environment }}
- name: ApiClientConfiguration.BookingsApiUrl
value: ${{ variables.bookingsApiUrl }}
- name: ApiClientConfiguration.VideoApiUrl
value: ${{ variables.videoApiUrl }}
- name: ApiClientConfiguration.UserApiUrl
value: ${{ variables.userApiUrl }}
- group: slack
steps:
- template: pipelines/templates/run-ui-test.yaml
parameters:
adminWebOverrideUrl: ${{ parameters.adminWebOverrideUrl }}
videoWebOverrideUrl: ${{ parameters.videoWebOverrideUrl }}
environment: ${{ parameters.environment }}
projectPath: ${{ variables.projectPath }}
testRunTitle: 'UI Tests ${{ parameters.environment }} - ${{ testCategory }}'
testCategory: ${{ testCategory }}
subscriptionName: ${{ variables.subscriptionName }}
testReportArtifactName: 'UI_Report'
testReportDisplayName: 'Publish UI Test Output'
slackTestReportName: UI
slackTitle: UI Tests - ${{ testCategory }}
- task: PublishBuildArtifacts@1
displayName: Publish UI HTML Report
condition: succeededOrFailed()
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)/UITestReports/'
artifactName: UI_Html_Report
- task: PublishHtmlReport@1
displayName: 'Publish UI Test Reports'
condition: succeededOrFailed()
inputs:
reportDir: '$(Build.ArtifactStagingDirectory)/UITestReports/'
useFilenameTabs: true
- ${{ if eq(parameters.runA11yTests, true) }}:
- job: A11Y_Tests
displayName: A11Y Tests ${{ parameters.environment }}
variables:
- name: SystemConfiguration.EnvironmentConfigSettings.EnableAccessibilityCheck
value: true
- template: variables/${{ lower(parameters.environment) }}.yaml
- template: variables/shared.yaml
parameters:
environment: ${{ parameters.environment }}
runOnSauceLabs: ${{ parameters.runOnSaucelabs }}
runHeadlessBrowser: ${{ parameters.runHeadlessBrowser }}
- group: vh-automation-test-${{ parameters.environment }}
- group: FeatureFlags_${{ parameters.environment }}
- group: Saucelabs
- group: VodafoneConfiguration_${{ parameters.environment }}
- group: VodafoneConfiguration_${{ parameters.environment }}
- name: ApiClientConfiguration.BookingsApiUrl
value: ${{ variables.bookingsApiUrl }}
- name: ApiClientConfiguration.VideoApiUrl
value: ${{ variables.videoApiUrl }}
- name: ApiClientConfiguration.UserApiUrl
value: ${{ variables.userApiUrl }}
- group: slack
steps:
- template: pipelines/templates/run-ui-test.yaml
parameters:
adminWebOverrideUrl: ${{ parameters.adminWebOverrideUrl }}
videoWebOverrideUrl: ${{ parameters.videoWebOverrideUrl }}
environment: ${{ parameters.environment }}
projectPath: ${{ variables.projectPath }}
testCategory: a11y
testRunTitle: 'UI Tests A11y ${{ parameters.environment }}'
subscriptionName: ${{ variables.subscriptionName }}
testReportArtifactName: 'A11Y_Report'
testReportDisplayName: 'Publish A11Y Output'
slackTestReportName: A11y
slackTitle: A11y Tests
- task: PublishBuildArtifacts@1
displayName: Publish A11Y Output
condition: succeededOrFailed()
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)/'
artifactName: A11Y_Report