在CruiseControl.Net上显示Gallio报告

时间:2013-02-15 13:31:09

标签: cruisecontrol.net mbunit gallio

我正在建立一个CruiseControl.Net构建服务器。我的项目编译,并运行单元测试。

在我的ccnet.config中,我有这个:

<tasks>
    <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
        <workingDirectory>C:\CCNet\Working\Website</workingDirectory>
        <projectFile>Website.sln</projectFile>
        <buildArgs>/p:Configuration=Debug /v:quiet /t:rebuild</buildArgs>
        <timeout>120</timeout>
    </msbuild>

    <exec>
        <executable>C:\Program Files\Gallio\bin\Gallio.Echo.exe</executable>
        <buildArgs>/rnf:Utilities-test-report /rt:Xml-Inline /v:Quiet /rd:C:\CCNet\Working\Website_tests C:\CCNet\Working\Website\Utilities.UnitTests\bin\Debug\Utilities.UnitTests.dll</buildArgs>
    </exec>
    <exec>
        <executable>C:\Program Files\Gallio\bin\Gallio.Echo.exe</executable>
        <buildArgs>/rnf:XMLGenerator-test-report /rt:Xml-Inline /v:Quiet /rd:C:\CCNet\Working\Website_tests C:\CCNet\Working\Website\XMLGenerator.UnitTests\bin\Debug\XMLGenerator.UnitTests.dll</buildArgs>
    </exec>
</tasks>
<publishers>
  <xmllogger logDir="C:\CCNet\Working\Website_logs" />
  <artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="20" />
  <merge>
    <files>
        <file>C:\CCNet\Working\Website_tests\Utilities-test-report.xml</file>
        <file>C:\CCNet\Working\Website_tests\XMLGenerator-test-report.xml</file>
    </files>
  </merge>
</publishers>

在我的dashboard.config中我有这个:

<buildPlugins>
  <buildReportBuildPlugin>
    <xslFileNames>
      <xslFile>xsl\header.xsl</xslFile>
      <xslFile>xsl\modifications.xsl</xslFile>
      <xslFile>xsl\compile-msbuild.xsl</xslFile>
      <xslFile>xsl\MBUnitDetails.xsl</xslFile>
      <xslFile>xsl\MBUnitSummary.xsl</xslFile>
    </xslFileNames>
  </buildReportBuildPlugin>
  <buildLogBuildPlugin disableHighlightingWhenLogExceedsKB="50"/>
  <xslReportBuildPlugin description="MSBuild Report" actionName="BuildReport" xslFileName="xsl\msbuild.xsl"></xslReportBuildPlugin>
  <xslReportBuildPlugin description="MBUnit Test Report" actionName="GallioTestReport" xslFileName="xsl\MBUnitDetails.xsl" />
  <xslReportBuildPlugin description="MBUnit Test Report (Condensed)" actionName="GallioTestReportCondensed" xslFileName="xsl\MBUnitSummary.xsl" />
  <gallioAttachmentBuildPlugin />
</buildPlugins>

在仪表板中,当我点击“MBUnit测试报告”时,我有一个空白屏幕。当我点击测试报告(浓缩)时,我看到“没有测试运行”。当我查看构建日志时,我看到测试已运行:

<message>2 run, 2 passed, 0 failed, 0 inconclusive, 0 skipped</message>

XML测试文件在Website_tests中生成。

为了在CCNet仪表板上显示测试报告,我错过了什么?

谢谢

1 个答案:

答案 0 :(得分:0)

您应该在配置文件中<xmllogger logDir="C:\CCNet\Working\Website_logs" />之前合并文件