File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <RunSettings >
3+ <DataCollectionRunSettings >
4+ <DataCollectors >
5+ <DataCollector friendlyName =" Code Coverage" >
6+ <Configuration >
7+ <CodeCoverage >
8+ <ExcludeByFile >
9+ <File >**/Program.cs</File >
10+ </ExcludeByFile >
11+ </CodeCoverage >
12+ </Configuration >
13+ </DataCollector >
14+ </DataCollectors >
15+ </DataCollectionRunSettings >
16+ </RunSettings >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ $runDir = Join-Path $fullResults "run_$timestamp"
1616New-Item - ItemType Directory - Force - Path $runDir | Out-Null
1717$logFile = Join-Path $runDir ' test.log'
1818Write-Host ' Executing dotnet test with coverage...' - ForegroundColor Green
19- & dotnet test $Solution -- collect:" XPlat Code Coverage" -- results- directory $runDir | Tee-Object - FilePath $logFile
19+ & dotnet test $Solution -- collect:" XPlat Code Coverage" -- results- directory $runDir -- settings:.runsettings | Tee-Object - FilePath $logFile
2020if ($LASTEXITCODE -ne 0 ){ Write-Host ' dotnet test failed.' - ForegroundColor Red; exit 1 }
2121# Find coverage files (cobertura or json)
2222$coverageFiles = Get-ChildItem - Recurse - Path $runDir - Filter ' coverage.cobertura.xml'
You can’t perform that action at this time.
0 commit comments