Skip to content

Instantly share code, notes, and snippets.

@jdonaldson10
Created January 15, 2015 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdonaldson10/495a8d0ace2eb004e9da to your computer and use it in GitHub Desktop.
Save jdonaldson10/495a8d0ace2eb004e9da to your computer and use it in GitHub Desktop.
Bat file to perform all our build needs
REM Configuration
set NUNIT_RESULT="nunit-result.xml"
set OPENCOVER_RESULT="opencover-result.xml"
set COBERTURA_RESULT="cobertura-result.xml"
REM Run Nunit & OpenCover
"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -target:"C:\Program Files (x86)\NUnit 2.6.2\bin\nunit-console.exe" -targetargs:"/xml=%NUNIT_RESULT% /nologo /noshadow \"%WORKSPACE%\OptimePortal.Tests\bin\Release\OptimePortal.Tests.dll\"" -filter:"+[OptimePortal]* -[OptimePortal]OptimePortal.Tests.* -[OptimePortal]OptimePortal.Resources.* -[OptimePortal]OptimePortal.MvcApplication -[OptimePortal]OptimePortal.App_Start*" -register:user -output:"%OPENCOVER_RESULT%"
REM Generate cobertura results
C:\Users\eventmap\jenkins_build_tools\Palmmedia.OpenCoverToCoberturaConverter.exe -input:"%WORKSPACE%\%OPENCOVER_RESULT%" -output:"%WORKSPACE%\%COBERTURA_RESULT%"
REM Generate nice html coverage reports
"C:\Users\eventmap\jenkins_build_tools\ReportGenerator\bin\ReportGenerator.exe" "-reports:%WORKSPACE%\%OPENCOVER_RESULT%" "-targetdir:%WORKSPACE%\opencover_report" -reporttypes:Html;HtmlSummary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment