I have configured a Nunit test runner build step which successfully runs my testsuite, pointing at a test sub-project of my .Net solution eg. Solution/Solution.Test/bin/debug/Solution.Test.dll.
My solution structure is as follows:
- Solution
- Solution.Lib
- Solution.Model
- Solution.Test
Lib and Model dlls are referenced in the test project.
I then turned on dotCover without any assembly filters and it performed code coverage analysis on the above test dll correctly.
I then added a filter, -:Solution.Test, and added +:Solution.Lib, and +:Solution.Model to the assembly filters and ran the build configuration, and the build.log reported the following:
Generate dotCover HTML report
[17:15:41][Generate dotCover HTML report] No source files were found under the build checkout directory W:\TeamCity\Install\buildAgent\work\7136872008cbf3bf. No source files will be included in dotCover report as source code of classes.
No executable code was detected.
The issue could be caused by one of the following:
- Include / exclude patterns are incorrect
- Assemblies are compiled without debugging information
- .pdb files are not available
- Visual Studio code coverage is enabled for MSTest
- .testrunconfig is used for MSTest and Visual Studio code coverage is not disabled (CodeCoverage section with enable="true" is present)
So I'm wondering with the above configuration what am I doing wrong, if the paths are correct?