Skip to content

Template for YAML Pipeline Support #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 14, 2020
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,4 @@ paket-files/
.idea/
*.sln.iml
/TestAutomationURLs.json
/TestAutomationURLs.old
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public BrowserCommandResult<List<Uri>> GetTestURLs(string filePath)
{
return this.Execute(GetOptions("Get List of Test URLs"), driver =>
{
//Replace encoded characters (%20) if present
if (filePath.Contains("%20"))
{
filePath = filePath.Replace("%20", " ");
}
// Initialize list of URLs
List<Uri> testUrlList = new List<Uri>();

Expand Down
126 changes: 0 additions & 126 deletions azure-pipelines.yml

This file was deleted.

88 changes: 88 additions & 0 deletions frameworksteps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# File: frameworksteps.yml

parameters:
OnlineUsername: ''
OnlinePassword: ''
BrowserTypeFirefox: ''
BrowserTypeChrome: ''
OnlineUrl: ''
TestAutomationURLFilePath: ''
UsePrivateMode: ''
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 ${{ parameters.BrowserTypeChrome }}'

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 ${{ parameters.BrowserTypeChrome }} -OnlineUrl ${{ parameters.OnlineUrl }} -UsePrivateMode ${{ parameters.UsePrivateMode }} -TestAutomationURLFilePath ${{ parameters.TestAutomationURLFilePath }} -DriversPath $(ChromeWebDriver)'

testRunTitle: 'Run Power Apps Test Automation Tests via ${{ parameters.BrowserTypeChrome }}'

continueOnError: true



- task: VSTest@2

displayName: 'Run Power Apps Test Automation Tests via ${{ parameters.BrowserTypeFirefox }}'

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 ${{ parameters.BrowserTypeFirefox }} -OnlineUrl ${{ parameters.OnlineUrl }} -UsePrivateMode ${{ parameters.UsePrivateMode }} -TestAutomationURLFilePath ${{ parameters.TestAutomationURLFilePath }} -DriversPath $(GeckoWebDriver)'

testRunTitle: 'Run Power Apps Test Automation Tests via ${{ parameters.BrowserTypeFirefox }}'

continueOnError: true