Run tests in the pipeline

This commit is contained in:
Matt Cooley 2022-09-22 15:24:14 -07:00
commit e68002a887
2 changed files with 20 additions and 6 deletions

View file

@ -21,13 +21,15 @@ jobs:
- checkout: none
- task: DownloadBuildArtifacts@0
displayName: Download CalculatorUnitTests
displayName: Download test files
inputs:
artifactName: drop
itemPattern: drop/Release/${{ parameters.platform }}/CalculatorUnitTests/AppPackages/CalculatorUnitTests_Test/**
itemPattern: |
drop/Release/${{ parameters.platform }}/CalculatorUnitTests/AppPackages/CalculatorUnitTests_Test/**
drop/Release/${{ parameters.platform }}/CalculatorApp.ViewModel.Tests/AppPackages/CalculatorApp.ViewModel.Tests_Test/**
- task: PowerShell@2
displayName: Install Certificate
displayName: Install certificate
inputs:
filePath: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\Add-AppDevPackage.ps1
arguments: -CertificatePath $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.cer -Force
@ -37,3 +39,9 @@ jobs:
inputs:
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.msix
otherConsoleOptions: /Platform:${{ parameters.platform }}
- task: VSTest@2
displayName: Run CalculatorApp.ViewModel.Tests
inputs:
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorApp.ViewModel.Tests\AppPackages\CalculatorApp.ViewModel.Tests_Test\CalculatorApp.ViewModel.Tests.msix
otherConsoleOptions: /Platform:${{ parameters.platform }}

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@ -17,7 +17,10 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<AppxPackageName>CalculatorApp.ViewModel.Tests</AppxPackageName>
<AppxOSMinVersionReplaceManifestVersion>true</AppxOSMinVersionReplaceManifestVersion>
<AppxOSMaxVersionTestedReplaceManifestVersion>true</AppxOSMaxVersionTestedReplaceManifestVersion>
<PackageCertificateKeyFile>WindowsDev_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
@ -153,6 +156,9 @@
<SubType>Designer</SubType>
</PRIResource>
</ItemGroup>
<ItemGroup>
<None Include="WindowsDev_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.14</Version>