TeamCity MSBuild Gallio NCover 报告

发布于 2024-08-07 05:21:07 字数 1335 浏览 9 评论 0原文

我是一个彻头彻尾的构建系统新手。我已经断断续续地玩了大约两周,但我就是无法破解它,我想我已经到了需要一双新眼睛的地步。最终,我的目标是在我的 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&#xA;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 技术交流群。

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

发布评论

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

评论(1

留蓝 2024-08-14 05:21:07

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

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