File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed
test/Dotnet.Samples.AspNetCore.WebApi.Tests Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 4646 uses : actions/checkout@v4
4747
4848 - name : Run tests and generate Cobertura coverage reports
49- run : dotnet test --results-directory "coverage" --collect:"Code Coverage;Format=cobertura " --settings .runsettings
49+ run : dotnet test --results-directory "coverage" --collect:"XPlat Code Coverage" --settings .runsettings
5050
5151 - name : Install dotnet-coverage tool
5252 run : dotnet tool install --global dotnet-coverage
Original file line number Diff line number Diff line change 22<RunSettings >
33 <DataCollectionRunSettings >
44 <DataCollectors >
5- <DataCollector friendlyName =" Code Coverage" uri = " datacollector://Microsoft/CodeCoverage/2.0 " >
5+ <DataCollector friendlyName =" XPlat Code Coverage" >
66 <Configuration >
7+ <Format >cobertura</Format >
8+ <SkipAutoProps >true</SkipAutoProps >
9+ <BasePath >$(MSBuildProjectDirectory)</BasePath >
710 <CodeCoverage >
8- <!-- Exclude all test projects -->
911 <ModulePaths >
12+ <!-- Exclude all test projects -->
1013 <Exclude >
1114 <ModulePath >.*\.Tests\.dll$</ModulePath >
1215 </Exclude >
Original file line number Diff line number Diff line change 99 </PropertyGroup >
1010
1111 <ItemGroup >
12+ <PackageReference Include =" coverlet.collector" Version =" 6.0.4" >
13+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
14+ <PrivateAssets >all</PrivateAssets >
15+ </PackageReference >
1216 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.13.0" />
1317 <PackageReference Include =" xunit" Version =" 2.9.3" />
1418 <PackageReference Include =" xunit.runner.visualstudio" Version =" 3.0.2" >
Original file line number Diff line number Diff line change 22 "version" : 1 ,
33 "dependencies" : {
44 "net8.0" : {
5+ "coverlet.collector" : {
6+ "type" : " Direct" ,
7+ "requested" : " [6.0.4, )" ,
8+ "resolved" : " 6.0.4" ,
9+ "contentHash" : " lkhqpF8Pu2Y7IiN7OntbsTtdbpR1syMsm2F3IgX6ootA4ffRqWL5jF7XipHuZQTdVuWG/gVAAcf8mjk8Tz0xPg=="
10+ },
511 "FluentAssertions" : {
612 "type" : " Direct" ,
713 "requested" : " [8.2.0, )" ,
You can’t perform that action at this time.
0 commit comments