Assemblies/namespaces with no coverage missing. Bug or Feature?

Hi,
I am currently working on a larger project and found that namespaces with no unit tests touching them are excluded from the coverage-report. However they should be shown with 0 coverage.
Is there the any way to force dotCover to count any assembly in the project that is filtered out (by the coverage filter)?

Using dotCover 2.1.471.44 (Trial)

Regards
Thomas Kowalski

2 comments
Hello Thomas,



For now dotCover doesn't have a possibility to get coverage info about the assemblies which weren't loaded during unit test execution. So such assemblies aren't included in the coverage report.
We already have a corresponding request in our tracker: http://youtrack.jetbrains.com/issue/DCVR-2305.
You are welcome to track its status, vote and comment.


Regards.








0

Thanks for the fast and helpful answer. I voted for this issue to be fixed. In my opinion it's a really crucial bug, giving you false security. As a workaround I currently added a test to load all assemblies which fixed the issue:

        [Fact]
        public void LoadAllAssemblies_ToDiscoverUntestedCode()
        {
            var dirInfo = new DirectoryInfo(Directory.GetCurrentDirectory());            
            var dlls = dirInfo.GetFiles("*.dll", SearchOption.AllDirectories); 
            foreach (var dll in dlls) {
                var asm=  Assembly.LoadFile(dll.FullName);
            }
        }


Regards,
Thomas
0

Please sign in to leave a comment.