-
Notifications
You must be signed in to change notification settings - Fork 694
/
frameworksteps.yml
88 lines (50 loc) · 3.12 KB
/
frameworksteps.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
# File: frameworksteps.yml
parameters:
OnlineUsername: ''
OnlinePassword: ''
BrowserType: ''
OnlineUrl: ''
TestAutomationURLFilePath: ''
UsePrivateMode: ''
LoginMethod: ''
RepositoryName: 'PowerAppsTestAutomation'
steps:
- powershell: |
# Set agent screen resolution to 1920x1080 to avoid sizing issues with Portal
Set-DisplayResolution -Width 1920 -Height 1080 -Force
# Wait 10 seconds
Start-Sleep -s 10
# Verify Screen Resolution is set to 1920x1080
Get-DisplayResolution
ignoreLASTEXITCODE: true
displayName: 'Set Agent Screen Resolution to 1920x1080'
- task: NuGetCommand@2
displayName: 'Restore NuGet Packages'
inputs:
restoreSolution: '${{parameters.RepositoryName}}/PowerAppsTestAutomation.sln'
- task: VSBuild@1
displayName: 'Build Power Apps Test Automation Solution'
inputs:
solution: '${{parameters.RepositoryName}}/PowerAppsTestAutomation.sln'
- task: VSTest@2
displayName: 'Run Power Apps Test Automation Tests via Chrome'
condition: or(eq('${{ parameters.BrowserType }}', 'Chrome'), eq('${{ parameters.BrowserType }}', 'All'))
inputs:
testAssemblyVer2: '${{parameters.RepositoryName}}\Microsoft.PowerApps.TestAutomation.Tests\bin\Debug\Microsoft.PowerApps.TestAutomation.Tests.dll'
testFiltercriteria: 'TestCategory=PowerAppsTestAutomation'
uiTests: true
runSettingsFile: '${{parameters.RepositoryName}}\Microsoft.PowerApps.TestAutomation.Tests/patestautomation.runsettings'
overrideTestrunParameters: '-OnlineUsername ${{ parameters.OnlineUsername }} -OnlinePassword ${{ parameters.OnlinePassword }} -BrowserType "Chrome" -OnlineUrl ${{ parameters.OnlineUrl }} -UsePrivateMode ${{ parameters.UsePrivateMode }} -TestAutomationURLFilePath ${{ parameters.TestAutomationURLFilePath }} -DriversPath $(ChromeWebDriver) -LoginMethod ${{ parameters.LoginMethod }}'
testRunTitle: 'Run Power Apps Test Automation Tests via Chrome'
continueOnError: true
- task: VSTest@2
displayName: 'Run Power Apps Test Automation Tests via Firefox'
condition: or(eq('${{ parameters.BrowserType }}', 'Firefox'), eq('${{ parameters.BrowserType }}', 'All'))
inputs:
testAssemblyVer2: '${{parameters.RepositoryName}}\Microsoft.PowerApps.TestAutomation.Tests\bin\Debug\Microsoft.PowerApps.TestAutomation.Tests.dll'
testFiltercriteria: 'TestCategory=PowerAppsTestAutomation'
uiTests: true
runSettingsFile: '${{parameters.RepositoryName}}\Microsoft.PowerApps.TestAutomation.Tests/patestautomation.runsettings'
overrideTestrunParameters: '-OnlineUsername ${{ parameters.OnlineUsername }} -OnlinePassword ${{ parameters.OnlinePassword }} -BrowserType "Firefox" -OnlineUrl ${{ parameters.OnlineUrl }} -UsePrivateMode ${{ parameters.UsePrivateMode }} -TestAutomationURLFilePath ${{ parameters.TestAutomationURLFilePath }} -DriversPath $(GeckoWebDriver) -LoginMethod ${{ parameters.LoginMethod }}'
testRunTitle: 'Run Power Apps Test Automation Tests via Firefox'
continueOnError: true