TeamCity MSBuild Gallio NCover 报告
我是一个彻头彻尾的构建系统新手。我已经断断续续地玩了大约两周,但我就是无法破解它,我想我已经到了需要一双新眼睛的地步。最终,我的目标是在我的 TeamCity 构建项目中获得一份新的 NCover 覆盖率报告(至少是摘要报告)。
我尝试了各种各样的事情,我在网上找到了一些演示,NCover 人员提供的附加内容,并且阅读了很多内容,我很困惑!我的 MSBuild 脚本中有以下任务:
<Target Name="TestCoverage">
<Message Text="Test Assemblies @(TestAssemblies)" />
<Gallio RunnerType="NCover"
IgnoreFailures="true"
Files="@(TestAssemblies)"
ReportDirectory="Reports"
ReportTypes="xml"
ReportNameFormat="gallio_cover"
RunnerProperties="NCoverCoverageFile='$(MSBuildProjectDirectory)\Reports\codecoverage.xml';
NCoverArguments='//w %(TestAssemblies.RootDir)%(TestAssemblies.Directory) CoverageExcludeAttribute //ea //r:Local'" >
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
</Target>
我在生成的 gallio_cover.xml 报告中看到的错误消息是:
<logEntry severity="info" message="Connected
Profiled process terminated. Profiler connection not established." />
<logEntry severity="error" message="Host process exited with code: 1" />
我已经从最后一条消息中剪掉了一些内容。
我见过很多不同的例子来说明“应该如何做”,以至于我似乎无法找出我如何通过 Gallio 调用 NCover 的问题。
任何想法或意见将不胜感激。
谢谢,
詹姆斯。
I'm a complete build system newbie through and through. I've been playing with this for about two weeks on and off now and I just can't crack it, I think I've reached a point where I need a fresh pair of eyes. Ultimately I'm aiming for having a new NCover coverage report (the summary one at least) in my TeamCity build project.
I've tried all manner of things, some demo's I've found online, the Extras from the NCover guys and read so much I'm pretty confused! I have the following task in my MSBuild script:
<Target Name="TestCoverage">
<Message Text="Test Assemblies @(TestAssemblies)" />
<Gallio RunnerType="NCover"
IgnoreFailures="true"
Files="@(TestAssemblies)"
ReportDirectory="Reports"
ReportTypes="xml"
ReportNameFormat="gallio_cover"
RunnerProperties="NCoverCoverageFile='$(MSBuildProjectDirectory)\Reports\codecoverage.xml';
NCoverArguments='//w %(TestAssemblies.RootDir)%(TestAssemblies.Directory) CoverageExcludeAttribute //ea //r:Local'" >
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
</Target>
The error message I see in the gallio_cover.xml report that is produced is:
<logEntry severity="info" message="Connected
Profiled process terminated. Profiler connection not established." />
<logEntry severity="error" message="Host process exited with code: 1" />
I've snipped off a load of stuff from the last message.
I've seen so many different examples of how this 'should be done' that I can't seem to track down the problem with how I'm calling NCover via Gallio.
Any ideas or input would be really appreciated.
Thanks,
James.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Ncover 可以执行任何测试框架。我们只需要知道应用程序即可调用该应用程序的参数。
您是否阅读过有关将 NCover 与 TeamCity 集成的信息?
http://docs.ncover.com/how-to/continuous-integration /teamcity/
如果您有任何疑问,请随时联系支持人员。
谢谢你,
乔·费瑟
NCover
NCover can execute any testing framework. We just need to know the application to call the parameters for that application.
Did you read this information on integrating NCover with TeamCity?
http://docs.ncover.com/how-to/continuous-integration/teamcity/
If you have any questions, feel free to contact support.
Thank you,
Joe Feser
NCover