Coverage performed for references - 3.0.10

Coverage performed for references - 3.0.10

Hi

I'm trying out beta 10 for 3.0, and I am using the following msbuild task to build.

From this I expect NCover to only perform coverage for the assemblies specified in TestRunnerArgs. The problem is that all references are also included in the coverage result. I would very much like to have exclude all 3rd party libraries from the coverage, without having to add them to the exclude list. How can I do this?

I also tried using the following MSBuild script to exclude references

but that only resulted in the following error Invalid regular expression in Excluded Assemblies list: Server\lib\CommunicationFrameworkTX5.dll Invalid regular expression in Excluded Assemblies list: Server\lib\Rhino.Mocks.dll Invalid regular expression in Excluded Assemblies list: ServerInterfaces\lib\CommunicationFrameworkTX5.dll

Which is also the case if I add anything to the list of IncludeAssemblies

I see no reason why referenced assemblies should be included in the result for the coverage run, as they have not been referenced in the targets to analyze.


RE: Coverage performed for references - 3.0.10

Since we have no way to tell the difference between included references for coverage and references that should be excluded, we have no option but to report on everything that is referenced. There are a list of default excluded assemblies in the ncover.console.exe.config file and if you feel additional assemblies should be added, feel free to send us a list and we will include them.

Since the list is a regular expression, you need to escape the \ and .'s. Also you should not include the path, just the name of the assembly. CommunicationFrameworkTX5; Rhino.Mocks should be all that is required for the excluded assembly list.

An example of an escaped regex would be: CommunicationFrameworkTX5.dll

. and \ are reserved characters.

Hope this helps.

Joe


RE: Coverage performed for references - 3.0.10

Thank you. I will check it out.

In version 2.1.2, referenced assemblies are not included in the result (at least not in the report). There is a link between module/assembly and methods/classes, I figure only including the result of the assemblies actually being added for testing, shoudln't be too big an issue. Unless I'm very much mistaken.


RE: Coverage performed for references - 3.0.10

In the past, assemblies that had no pdb symbols were not included. Since we support branch point coverage better now, we include everything we can find unless you tell us otherwise.

We cover everything that is loaded into the application domain.

Hope that helps.

Joe