为什么 NCover 忽略我的程序集?
我正在使用 NAnt 通过 TeamCity 运行我的构建。构建运行没有任何问题。它还向我显示所有测试都已通过。 Ncover 创建了覆盖范围 xml 文件。有很多关于 mspec 用于运行测试的组件的信息,但没有关于我的代码的信息。生成 Html 报告时,我的模块完全丢失。对我来说这真的很奇怪。 有人可以帮助我吗?
NAnt 目标:
<target name="teamcity">
<ncover program="c:\Program Files\NCover\ncover.Console.exe"
testRunnerExe="src\Solutions\packages\Machine.Specifications.0.4.9.0\tools\mspec-clr4.exe"
testRunnerArgs="src\Mock2Dgs.Tests\bin\Debug\Mock2Dgs.Tests.dll --teamcity" />
<mkdir dir="Artifacts/coverage" />
<exec program="c:\Program Files\NCover\NCoverExplorer.Console.exe" output="ncoverexplorer.log" workingdir="Artifacts/coverage">
<arg value="..\..\Coverage.xml" />
<arg value="/h:coverage" />
<arg value="/r:FullCoverageReport" />
<arg value="/p:${Project.Name}" />
<!--<arg value="/eas:${coverage.ExcludeAssemblies}" />-->
</exec>
</target>
I am using NAnt to run my builds with TeamCity. The build is running without any problem. It also displays me that all tests had passed. NCover created the coverage xml file. There are a lot of information about the components mspec is using to run the tests in it but there is nothing about my code. When generating the Html-Report my module is missing completely. For me this is really strange.
Is there someone who is able to help me?
The NAnt-target:
<target name="teamcity">
<ncover program="c:\Program Files\NCover\ncover.Console.exe"
testRunnerExe="src\Solutions\packages\Machine.Specifications.0.4.9.0\tools\mspec-clr4.exe"
testRunnerArgs="src\Mock2Dgs.Tests\bin\Debug\Mock2Dgs.Tests.dll --teamcity" />
<mkdir dir="Artifacts/coverage" />
<exec program="c:\Program Files\NCover\NCoverExplorer.Console.exe" output="ncoverexplorer.log" workingdir="Artifacts/coverage">
<arg value="..\..\Coverage.xml" />
<arg value="/h:coverage" />
<arg value="/r:FullCoverageReport" />
<arg value="/p:${Project.Name}" />
<!--<arg value="/eas:${coverage.ExcludeAssemblies}" />-->
</exec>
</target>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
出现这种行为的最可能原因是您没有可用的最新调试符号?您是否使用调试符号进行编译?
The most likely reason for this kind of behavior is that you don't have up to date debug symbols available? Are you compiling with debug symbols?
您使用什么版本的 NCover?从您的命令来看,它看起来可能是早期版本(可能是 1.5.8)。
What version of NCover are you using? From your commands, it looks like maybe an earlier version (possibly 1.5.8).