-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGenCodeCoverage.bat
More file actions
26 lines (19 loc) · 1.35 KB
/
GenCodeCoverage.bat
File metadata and controls
26 lines (19 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
rmdir /s /q TestResults
rmdir /s /q TestCoverage
REM Add '--no-build' to run the tests without building the project
REM Not using the --framework option as this causes the pipes tests to be excluded, and it's not possible to provide a 'windows' related moniker
dotnet test AllOverIt.slnx --configuration Release /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" --results-directory TestResults
REM dotnet test AllOverIt.sln --framework net8.0 /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" --results-directory TestResults
REM Usage: https://reportgenerator.io/usage
REM dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.8
REM
ReportGenerator.exe "-reports:.\TestResults\/**/*.cobertura.xml" "-targetdir:.\TestCoverage" "-assemblyfilters:-TestUtils" "-reporttypes:Cobertura;Badges;Html;HtmlSummary;MarkdownSummary"
rmdir /s /q TestResults
copy ".\TestCoverage\summary.html" ".\Docs\Code Coverage\summary.html"
copy ".\TestCoverage\Summary.md" ".\Docs\Code Coverage\summary.md"
copy ".\TestCoverage\badge_linecoverage.svg" ".\Docs\Code Coverage\badge_linecoverage.svg"
copy ".\TestCoverage\badge_branchcoverage.svg" ".\Docs\Code Coverage\badge_branchcoverage.svg"
copy ".\TestCoverage\badge_methodcoverage.svg" ".\Docs\Code Coverage\badge_methodcoverage.svg"
cd TestCoverage
REM pause
explorer index.html