5

我是一个完整的构建系统新手。我已经断断续续地玩了大约两个星期,但我就是无法破解它,我想我已经到了需要一双新眼睛的地步。最终,我的目标是在我的 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 的问题。

任何想法或意见将不胜感激。

谢谢,

詹姆士。

4

1 回答 1

2

NCover 可以执行任何测试框架。我们只需要知道应用程序就可以调用该应用程序的参数。

您是否阅读过有关将 NCover 与 TeamCity 集成的信息?

http://docs.ncover.com/how-to/continuous-integration/teamcity/

如果您有任何问题,请随时联系支持人员。

谢谢,

乔·费瑟 NCover

于 2009-10-08T16:18:02.103 回答