ncover 与 NAnt 中的 nunit2 任务
有机会得到这份工作吗? 我希望我的测试由 NAnt 中的 nunit2 任务运行。 另外,我想运行 Nover 而无需再次运行测试。
Is there any chance to get this work? I want my tests to be run by nunit2 task in NAnt. In addition I want to run NCover without running tests again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想到了。 您将 NUnit 启动器的路径更改为 TeamCity 自己的路径。 这是一个例子:
正如你所看到的,我在那里有一些我自己的变量,但你应该能够弄清楚发生了什么。 您关心的属性是 teamcity.dotnet.nunitlauncher。 您可以在 http://www.jetbrains.net/confluence/display/TCD4/TeamCity+NUnit+Test+Launcher" rel="nofollow noreferrer">http://www. jetbrains.net/confluence/display/TCD4/TeamCity+NUnit+Test+Launcher。
I figured it out. You change the path of the NUnit launcher to that of TeamCity's own. Here is an example:
As you can see, I have some of my own variables in there, but you should be able to figure out what is going on. The property you are concerned with is teamcity.dotnet.nunitlauncher. You can read more about it here at http://www.jetbrains.net/confluence/display/TCD4/TeamCity+NUnit+Test+Launcher.
我也必须做同样的事情。 我认为我们最好的希望就是打开 TeamCity 附带的 NUnit jar 文件并编写集成 NUnit2 和 NCover 的自定义任务。 我希望事实并非如此,但 NUnit2 任务不会产生任何可见的输出,因此 TeamCity 显然不会读取 StdOut 来获取测试结果。
I am having to do the same thing. I think the best we can hope for is to break open the NUnit jar file that comes with TeamCity and writing a custom task that integrates NUnit2 and NCover. I wish this wasn't so, but the NUnit2 task does not produce any visible output, so TeamCity is obviously not reading StdOut for the test results.
为什么不让 NOver 运行 NUnit? 您会得到完全相同的测试结果。 另外,在测试之外运行 NCover 时,您到底想测量什么? 还有其他方法可以查找陈旧或未引用的代码。
Why not have NCover run NUnit? You get the exact same test results. Also, what exactly are you trying to measure when running NCover outside of the tests? There's other ways to find stale or unreferenced code.