Skip to content

Commit b621159

Browse files
Configure code coverage with MTP
1 parent 04be319 commit b621159

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

build/steps-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ 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 --collect:"XPlat Code Coverage"
13+
- script: dotnet test --configuration ${{ parameters.configuration }} --report-xunit-trx
1414
displayName: Build and Test
1515

1616
- task: PublishTestResults@2
@@ -24,5 +24,4 @@ steps:
2424
displayName: Publish Code Coverage
2525
inputs:
2626
codeCoverageTool: Cobertura
27-
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml
28-
reportDirectory: $(System.DefaultWorkingDirectory)
27+
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml

build/test.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44
<ItemGroup Condition=" '$(IsSharedProject)' == 'false' ">
5-
<PackageReference Include="coverlet.collector" Version="8.*" />
65
<PackageReference Include="FluentAssertions" Version="8.8.*" />
76
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
87
<PackageReference Include="Microsoft.Testing.Platform.MSBuild" Version="2.*" />
8+
<PackageReference Include="Microsoft.Testing.Platform.Extensions.CodeCoverage" Version="1.*" />
99
<PackageReference Include="Moq" Version="4.20.69" />
1010
<PackageReference Include="xunit.v3.mtp-v2" Version="3.*" />
1111
</ItemGroup>

0 commit comments

Comments
 (0)