File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ steps:
4141 inputs :
4242 command : test
4343 projects : ' **/https.Tests.csproj'
44+ arguments : ' --configuration $(buildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura -- xunit.parallelizeAssembly=true xunit.parallelizeTestCollections=true'
45+
46+ - script : |
47+ dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools
48+ ./tools/reportgenerator -reports:$(Build.SourcesDirectory)/tests/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:Cobertura
49+ displayName : Code Coverage Report
4450
4551- task : PublishBuildArtifacts@1
4652 displayName : Upload Artifacts
Original file line number Diff line number Diff line change 99
1010 <ItemGroup >
1111 <FrameworkReference Include =" Microsoft.AspNetCore.App" />
12+ <PackageReference Include =" coverlet.collector" Version =" 1.3.0" >
13+ <PrivateAssets >all</PrivateAssets >
14+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
15+ </PackageReference >
16+ <PackageReference Include =" coverlet.msbuild" Version =" 2.9.0" >
17+ <PrivateAssets >all</PrivateAssets >
18+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
19+ </PackageReference >
1220 <PackageReference Include =" Microsoft.Extensions.Hosting" Version =" 3.1.6" />
1321 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.6.1" />
1422 <PackageReference Include =" xunit" Version =" 2.4.1" />
You can’t perform that action at this time.
0 commit comments