我已经配置了一个 Nunit 测试运行器构建步骤,它成功运行了我的测试套件,指向我的 .Net 解决方案的测试子项目,例如。解决方案/Solution.Test/bin/debug/Solution.Test.dll。
我的解决方案结构如下:
- 解决方案
- 解决方案.Lib
- 解决方案.模型
- 解决方案.测试
测试项目中引用了 Lib 和 Model dll。
然后我在没有任何程序集过滤器的情况下打开了 dotCover,它正确地对上述测试 dll 执行了代码覆盖率分析。
然后我添加了一个过滤器 -:Solution.Test,并将 +:Solution.Lib 和 +:Solution.Model 添加到程序集过滤器并运行构建配置,并且 build.log 报告了以下内容:
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)
所以我想知道上面的配置我做错了什么,如果路径正确?