mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
vstest.console
This commit is contained in:
@@ -36,32 +36,14 @@ jobs:
|
|||||||
- task: VisualStudioTestPlatformInstaller@1
|
- task: VisualStudioTestPlatformInstaller@1
|
||||||
displayName: Ensure VSTest Platform
|
displayName: Ensure VSTest Platform
|
||||||
|
|
||||||
- task: VSTest@2
|
- task: PowerShell@2
|
||||||
displayName: 'MS Tests'
|
displayName: 'Run UI Tests'
|
||||||
condition: ne(variables['BuildPlatform'], 'arm64') # No arm64 agents to run the tests.
|
|
||||||
inputs:
|
inputs:
|
||||||
platform: '$(BuildPlatform)'
|
targetType: filePath
|
||||||
configuration: '$(BuildConfiguration)'
|
filePath: .pipelines\scripts\runUiTests.ps1
|
||||||
testSelector: 'testAssemblies'
|
arguments: >-
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)'
|
-SearchFolder '$(Build.ArtifactStagingDirectory)\x64\**\UITests-FancyZonesEditor.dll'
|
||||||
vstestLocationMethod: 'location'
|
-VsConsolePath 'D:\a\_work\_temp\VsTest'
|
||||||
vstestLocation: 'D:\a\_work\_temp\VsTest'
|
-MatchPattern '**\UITests-*.dll'
|
||||||
testAssemblyVer2: |
|
-LogPath '$(Build.ArtifactStagingDirectory)\Logs'
|
||||||
**\UnitTests-FancyZonesEditor.dll
|
-ResultPath "$(Build.ArtifactStagingDirectory)\TestResults"
|
||||||
!**\obj\**
|
|
||||||
!**\ref\**
|
|
||||||
|
|
||||||
- task: VSTest@2
|
|
||||||
displayName: 'UI Tests'
|
|
||||||
condition: ne(variables['BuildPlatform'], 'arm64') # No arm64 agents to run the tests.
|
|
||||||
inputs:
|
|
||||||
platform: '$(BuildPlatform)'
|
|
||||||
configuration: '$(BuildConfiguration)'
|
|
||||||
testSelector: 'testAssemblies'
|
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)'
|
|
||||||
vstestLocationMethod: 'location'
|
|
||||||
vstestLocation: 'D:\a\_work\_temp\VsTest'
|
|
||||||
uiTests: true
|
|
||||||
testAssemblyVer2: |
|
|
||||||
**\UITests-FancyZones.dll
|
|
||||||
**\UITests-FancyZonesEditor.dll
|
|
||||||
|
|||||||
18
.pipelines/scripts/runUiTests.ps1
Normal file
18
.pipelines/scripts/runUiTests.ps1
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[CmdLetBinding()]
|
||||||
|
Param(
|
||||||
|
[Parameter(Mandatory=$true, Position=0)]
|
||||||
|
[string]$SearchFolder,
|
||||||
|
[Parameter(Mandatory=$true, Position=1)]
|
||||||
|
[string]$VsConsolePath,
|
||||||
|
[Parameter(Mandatory=$true, Position=2)]
|
||||||
|
[string]$MatchPattern,
|
||||||
|
[Parameter(Mandatory=$true, Position=3)]
|
||||||
|
[string]$LogPath,
|
||||||
|
[Parameter(Mandatory=$true, Position=4)]
|
||||||
|
[string]$ResultPath
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Output "Starting UI tests"
|
||||||
|
|
||||||
|
$Cmd = "$VsConsolePath\vstest.console.exe $SearchFolder /Logger:trx;LogFileName=$LogPath /ResultsDirectory:$ResultPath"
|
||||||
|
Invoke-Expression -Command $Cmd
|
||||||
Reference in New Issue
Block a user