0

我正在设置 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 仪表板上显示测试报告,我错过了什么?

谢谢

4

1 回答 1

0

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

于 2013-02-15T20:15:07.833 回答