Permalink
Browse files

Switch test coverage measurement from PartCover to OpenCover

  • Loading branch information...
binarymash committed Jun 25, 2011
1 parent 35ae4d2 commit b52e3fd7f1a4502c483877eca646d18d9a397e21
Showing with 11 additions and 14 deletions.
  1. +1 −1 Build/Config/user/BuildMachineWindows.config
  2. +1 −1 Build/Config/user/user.config
  3. +9 −12 Build/Stages/TestCoverage.build
@@ -10,7 +10,7 @@
<property name="msbuild.configuration" value="Release" />
<!-- Test coverage report configuration; remove if not installed on your machine -->
- <property name="partcover.exe" value="C:\Program Files\PartCover\PartCover .NET 4.0\PartCover.Exe" />
+ <property name="partcover.exe" value="C:\Program Files\OpenCover\OpenCover.Console.exe" />
<!-- system test database connection -->
<property name="ConnectionString" value="Data Source=LAPTOP\SQLEXPRESS;User ID=devadmin;Password=devadminpass" />
@@ -10,7 +10,7 @@
<property name="msbuild.configuration" value="Debug" />
<!-- Test coverage report configuration; remove if not installed on your machine -->
- <property name="partcover.exe" value="G:\Program Files\PartCover\PartCover .NET 4.0\PartCover.Exe" />
+ <property name="opencover.exe" value="G:\Program Files\OpenCover\OpenCover.Console.exe" />
<!-- system test database connection -->
<property name="ConnectionString" value="Data Source=LAPTOP\SQLEXPRESS;User ID=devadmin;Password=devadminpass" />
@@ -2,26 +2,23 @@
<property name="module.bin.dir" value="${buildarea.output.dir}\" />
<property name="artifacts.coverage.dir" value="${artifacts.dir}\testcoverage\" overwrite="false"/>
- <property name="artifacts.coverage.partcover.output" value="${artifacts.coverage.dir}coverage.xml" />
+ <property name="artifacts.coverage.opencover.output" value="${artifacts.coverage.dir}coverage.xml" />
- <target name="TestCoverage" if="${property::exists('partcover.exe')}">
+ <target name="TestCoverage" if="${property::exists('opencover.exe')}">
<mkdir dir="${artifacts.dir}/testcoverage/" failonerror="true" />
- <exec program="${partcover.exe}" failonerror="true">
- <arg value='--target "${nunit.exe}"' />
- <arg value='--target-work-dir "${module.bin.dir}"'/>
- <arg value='--target-args "Bluejam.Utils.DatabaseScripter.Tests.dll"' />
- <arg value='--include "[Bluejam.Utils.DatabaseScripter*]*"' />
- <arg value='--exclude "[Bluejam.Utils.DatabaseScripter.Tests]*"' />
- <arg value='--exclude "[Bluejam.Utils.DatabaseScripter.Test.Resources]*"' />
- <arg value='--exclude "[Bluejam.Utils.DatabaseScripter.SystemTests]*"' />
- <arg value='--output "${artifacts.coverage.partcover.output}"' />
+ <exec program="${opencover.exe}" failonerror="true">
+ <arg value='-target:"${nunit.exe}"' />
+ <arg value='-targetdir:"${module.bin.dir}"'/>
+ <arg value='-targetargs:Bluejam.Utils.DatabaseScripter.Tests.dll' />
+ <arg value='-filter:"+[Bluejam.Utils.DatabaseScripter*]* -[Bluejam.Utils.DatabaseScripter.Tests]* -[Bluejam.Utils.DatabaseScripter.Test.Resources]* -[Bluejam.Utils.DatabaseScripter.SystemTests]*"' />
+ <arg value='-output:"${artifacts.coverage.opencover.output}"' />
</exec>
<!-- seems to be broken with the current version of partcover
<exec program="${reportgenerator.exe}" failonerror="false">
- <arg value='"${artifacts.coverage.partcover.output}"' />
+ <arg value='"${artifacts.coverage.opencover.output}"' />
<arg value='"${artifacts.coverage.dir}\"' />
</exec>
-->

0 comments on commit b52e3fd

Please sign in to comment.