Cover dependant libraries.
Cover dependant libraries.
I am attempting to run coverage on our NUnit unit tests, which call our main code. Running the script at the end of this post produces coverage results only for the testing library and not the dependant libraries (i.e. the actual production code). I am guessing that I perhaps need to //ias argument specifing the additional files to test; ie. all files in the DEBDatabaseCartridge\bin\Debug folder being //ias "DEBDatabaseCartridgeTest\bin\Debug*". This doesn't work, however it might be on the right track perhaps?
<!-- Run NUnit / NCover Testings --> <exec program="c:\Program Files\NCover\NCover.Console.exe" failonerror="false"> <arg value="C:\Program Files\NUnit\bin\nunit-console.exe"/> <arg value=".\DEBDatabaseCartridgeTest\bin\Debug\DEBDatabaseCartridgeTest.dll"/> <arg value="/xml=E:\Build\Logs\DEBDatabaseCartridge\TestResults\UnitTest\DEBDatabaseCartridgeTest.dll-results.xml"/> <arg value="//xml"/> <arg value="E:\Build\Logs\DEBDatabaseCartridge\TestResults\CoverageTest\DEBDatabaseCartridge-Coverage.xml"/> </exec>
<exec program="c:\Program Files\NCover\NCover.Reporting.exe">
<arg value="E:\Build\Logs\DEBDatabaseCartridge\TestResults\CoverageTest\DEBDatabaseCartridge-Coverage.xml" />
<arg value="//rf" />
<arg value="Xml" />
<arg value="//r" />
<arg value="MethodSourceCodeClassMethod" />
<arg value="//op" />
<arg value="E:\Build\Logs\DEBDatabaseCartridge\TestResults\CoverageTest\DEBDatabaseCartridge-Report.xml" />
</exec>
RE: Cover dependant libraries.
Ooops, turns out I was using the wrong test project. Silly me.