n封面+ MS测试+ CruiseControl = 零覆盖

发布于 2024-09-08 11:44:00 字数 705 浏览 1 评论 0原文

我使用 CruiseControl.net、MSTest 3.5 和 nCover 1.5.8。 我是 nCover 的新手,希望将其集成到 CruiseControl 中。

问题是我得到了 0% 的覆盖率结果,但它应该是 100%。 我的演示应用程序仅调用一种方法,并且在我的 mstest 项目中对该方法进行了测试。在我的 CruiseControl 服务器中,无需 ncover 即可正常工作,并且我可以看到 mstest 结果(正常通过),

现在我想在 nCover 中完成。 在我的 CruiseControl 服务器中,我调用一个 nant 脚本来执行此操作(简化):

<target name="nCover">
  <exec program="C:\Programme\NCover\ncover.console.exe" 
       workingdir="C:\temp" 
       commandline="//a CCTestApp //x coverage.xml C:\MSTest.exe /testcontainer:UnitTests.dll /resultsfile:mstestResult.trx /nologo" />
</target>

在 CruiseControl 中运行此脚本似乎有效,我可以看到 ncover 结果。但结果是 0% 覆盖率

有什么想法吗?

再见本比

I use CruiseControl.net, MSTest 3.5 and nCover 1.5.8.
I am new to nCover and want to integrate it in CruiseControl.

The problem is that I get a 0% coverage result but it should be 100%.
My demo app calls just one method and in my mstest project this method is tested. in my cruiseControl server all works fine without ncover and i can see the mstest results (passes with ok)

now i want to through in nCover.
in my cruiseConttrol server I call a nant script that does this (simplified):

<target name="nCover">
  <exec program="C:\Programme\NCover\ncover.console.exe" 
       workingdir="C:\temp" 
       commandline="//a CCTestApp //x coverage.xml C:\MSTest.exe /testcontainer:UnitTests.dll /resultsfile:mstestResult.trx /nologo" />
</target>

Running this in cruisecontrol seems to work and i can see the ncover result. but the result is 0% coverage

any ideas?

bye bembi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

攒一口袋星星 2024-09-15 11:44:00

我得到了它!

如果使用 MSTest,您必须为 mstest 设置 /noisolation 标志才能使其正常工作!
此标志可防止 mstest 启动 ncover 无法处理的另一个线程。

I got it!

If using MSTest you have to set the /noisolation flag for mstest in order to get it working!
this flag prevents mstest from starting another thread which ncover can't handle.

三月梨花 2024-09-15 11:44:00

您还可以在 Nover 上设置 //coverall 标志,这将允许它在 MSTest 下处理进程隔离。

You can also set the //coverall flag on NCover, which will allow it to handle process isolation under MSTest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文