Created
April 10, 2011 19:59
-
-
Save topas/912672 to your computer and use it in GitHub Desktop.
Code coverage generation script for VS2010 and xUnit, NUnit, etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set curdir=%~dp0 | |
set outputdir=.\bin\ | |
set xunitfile="xunit.console.clr4.x86.exe" | |
set instr="c:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Performance Tools\VSInstr.exe" | |
set perfcmd="c:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Performance Tools\VSPerfcmd.exe" | |
mkdir %outputdir% | |
del %outputdir%*.dll %outputdir%*.orig %outputdir%*.pdb %outputdir%*.exe %outputdir%*.config %outputdir%*.coverage | |
copy ..\XXX.Tests\bin\Debug\*.dll %outputdir% | |
copy ..\XXX.Tests\bin\Debug\*.pdb %outputdir% | |
copy ..\xUnit\%xunitfile% %outputdir% | |
copy ..\xUnit\%xunitfile%.config %outputdir% | |
copy ..\xUnit\xunit.runner.utility.dll %outputdir% | |
rem List of code assemblies | |
%instr% %outputdir%XXX.dll /COVERAGE | |
%perfcmd% /start:COVERAGE /OUTPUT:%outputdir%Project.coverage | |
rem Run tests (xUnit, NUnit, etc...) | |
pushd %curdir% | |
cd %outputdir% | |
%xunitfile% XXX.Tests.dll | |
popd %curdir% | |
%perfcmd% /SHUTDOWN | |
call %outputdir%Project.coverage | |
@echo on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment