chore: add code coverage
This commit is contained in:
1 parent
dd47ddac98
commit
f41d12b7fd
11 files changed
+59
-20
No files matched your search
@@ -0,0 +1,22 @@
|
||||
Write-Host "Starting test execution..." -ForegroundColor Magenta
|
||||
Write-Host ""
|
||||
|
||||
dotnet test
|
||||
|
||||
|
||||
$TestExitCode = $LASTEXITCODE
|
||||
|
||||
if ($TestExitCode -eq 0) {
|
||||
Write-Host ""
|
||||
Write-Host "Tests passed. Generating code coverage HTML report..." -ForegroundColor Magenta
|
||||
Write-Host ""
|
||||
|
||||
reportgenerator -reports:"**/*.cobertura.xml" -targetdir:"CoverageReport"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "SUCCESS: All tests passed and coverage report generated." -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "FAILURE: Tests failed with exit code $TestExitCode. Skipping coverage report generation." -ForegroundColor Red
|
||||
}
|
||||
|
||||
exit $TestExitCode
|
||||
Reference in new issue
Block a user