代码之家  ›  专栏  ›  技术社区  ›  Jammer

TeamCity MSBuild Gallio NCover报告

  •  5
  • Jammer  · 技术社区  · 16 年前

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

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

    谢谢

    詹姆斯。

    1 回复  |  直到 16 年前
        1
  •  2
  •   joe.feser    16 年前

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

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

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

    非常感谢。

    乔·费瑟

    推荐文章