Tag: NCover

NCover Community version

I thought NCover is completely commercial, until yesterday I found NCover commnity version (1.5.8beta) on their website. With a little bit effort to enable it running on our CI server, we got a very simple version of code coverage report.

Here is the batch job I created to run NCover:

SET NCOVER=”c:\program files\ncover\ncover.console”
SET NUNIT=”C:\Work_Dir\StakeholderDemo2009\tools\nunit\nunit-console.exe”
SET WORK_DIR=”C:\Work_Dir\StakeholderDemo2009\compile”
SET ASSEMBLY=StakeholderDemo.Layers.Tests.dll

%NCOVER% //w %WORK_DIR%  %NUNIT%  “%WORK_DIR%\%ASSEMBLY%” //reg //x “%WORK_DIR%\Coverage.Xml” //l “%WORK_DIR%\Coverage.Log”

I’ve seen the report generated by commercial version, much better and detailed. According the feature comparison table, integration with NUnit will be simpler.

I currently added this NCover batch as a Publisher executable task in my CI project, because I want NCover run after every build no matter green or red.

One challenge left to me is, my NAnt build script should run NCover instead of NUnit on CI Server, otherwise all unit-tests will run twice.