File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,11 +10,19 @@ steps:
1010 packageType : sdk
1111 version : 10.0.x # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
1212
13- - script : dotnet test --configuration ${{ parameters.configuration }} --report-xunit-trx
13+ - script : dotnet test --configuration ${{ parameters.configuration }} --report-xunit-trx --collect:"XPlat Code Coverage"
1414 displayName : Build and Test
1515
1616- task : PublishTestResults@2
17+ displayName : Publish Test Results
1718 inputs :
1819 testResultsFormat : VSTest
1920 testResultsFiles : ' **/*.trx'
20- failTaskOnFailedTests : true
21+ failTaskOnFailedTests : true
22+
23+ - task : PublishCodeCoverageResults@2
24+ displayName : Publish Code Coverage
25+ inputs :
26+ codeCoverageTool : Cobertura
27+ summaryFileLocation : $(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml
28+ reportDirectory : $(System.DefaultWorkingDirectory)
Original file line number Diff line number Diff line change 22<Project xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
33
44 <ItemGroup Condition =" '$(IsSharedProject)' == 'false' " >
5+ <PackageReference Include =" coverlet.collector" Version =" 8.*" />
56 <PackageReference Include =" FluentAssertions" Version =" 8.8.*" />
67 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.*" />
78 <PackageReference Include =" Microsoft.Testing.Platform.MSBuild" Version =" 2.*" />
You can’t perform that action at this time.
0 commit comments