-
Notifications
You must be signed in to change notification settings - Fork 0
/
coverage.bat
34 lines (25 loc) · 1.37 KB
/
coverage.bat
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
27
28
29
30
31
32
33
34
rem ===========================================================================
rem coverage.bat
rem ===========================================================================
rem ===========================================================================
rem Tool path
set MSTEST="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
set OPENCOVER=%USERPROFILE%"\.nuget\packages\opencover\4.7.922\tools\OpenCover.Console.exe"
set REPORTGEN=%USERPROFILE%"\.nuget\packages\reportgenerator\4.5.2\tools\net47\ReportGenerator.exe"
rem ===========================================================================
rem target informations
rem test target
set TEST_TARGET="DockingManagerTests.dll"
rem Open Cover parameters
set TARGET=%MSTEST%
set TARGET_DIR="DockingManagerTests\bin\Debug"
set TARGET_ARG=%TEST_TARGET%
set OPENCOVER_RESULT="coverage.xml"
rem output ReportGenerator result directory
set OUTPUT_DIR="Coverage"
rem target filter
set FILTERS="+[*]* -[*]*.Properties.* -[*]*.Tests.* -[*]AutoGeneratedProgram"
rem ===========================================================================
%OPENCOVER% -register:user -target:%TARGET% -targetargs:%TARGET_ARG% -targetdir:%TARGET_DIR% -filter:%FILTERS% -output:%OPENCOVER_RESULT%
%REPORTGEN% -reports:%OPENCOVER_RESULT% -targetdir:%OUTPUT_DIR%
%OUTPUT_DIR%\index.htm