NCover.org and DLL's?
NCover.org and DLL's?
I've been using the NCover from Sourceforge to profile assemblies that are part of a library. I would like to use NCover.org to profile these assemblies, but the command line options require the path to an executable. Is there any way to use NCover.org to do coverage for DLL's that do not have an accompanying executable?
Thanks!
Re: Coverage Exclusions and MbUnit
Hi Andrew,
In a word - no. As you have guessed exclusions are based purely on the presence of an attribute, not on the value of their properties as well.
Personally I always recommend completely excluding the unit tests from the code coverage output and reports - they only add noise and volume to the output files imho. If your tests are running properly, the coverage on the test clsses should be 100%. If the tests fail, you have bigger problems than coverage and your coverage results are less meaningful because not all the test code got executed. If you only ran a portion of the tests - well, you already know only ran a portion of the tests so why report on that fact? So all it achieves in my opinion is skew unnecessarily your coverage percentage misleadingly closer to 100% than it really is.
As to how to exclude the tests - well we put our unit tests in separate assemblies from the source code so that is a doddle using the ability of NCover to only profile specific assemblies. Otherwise assuming your test code is in fixtures (with no supporting classes) then you can exclude classes with a test fixture attribute on them. Or you can use NCoverExplorer to exclude based on namespaces, classes and/or regular expressions etc.