在构建报告中合并NUnit和NAnt输出

JK.*_*JK. 5 c# cruisecontrol.net nant nunit

我刚刚开始使用CruiseControl.NET,我很难理解为什么NA​​nt和NUnit输出的合并不起作用.我已经设置了我ccnet.config在谷歌上找到的典型值:

<merge>
  <files>
    <file>D:\ccnet\path1\nant-results.xml</file>
    <file>D:\ccnet\path2\TestResult.xml</file>
  </files>
</merge>
<xmllogger /> 
Run Code Online (Sandbox Code Playgroud)

NAnt和ccnet只有一半工作:如果我故意输入代码错误,那么ccnet会说构建失败了.如果我故意进行一次失败的测试,同样的情况也会发生:ccnet会说构建失败了.

问题ViewBuildReport.aspx页面没有显示NAnt或NUnit的任何输出.

显然我必须遗漏一些东西,但我不知道是什么.有任何想法吗?

JK.*_*JK. 6

艾伯特 - 我在问了一段时间后偶然发现了答案.看来,这是CCNET的行为开箱.因此,默认情况下,它不会在Web仪表板中显示编译结果.

您需要找到文件\ CruiseControl.NET\webdashboard\dashboard.config,并在buildReportBuildPlugin部分中添加compile.xsl.添加时会如下所示:

<buildPlugins>
  <buildReportBuildPlugin>
    <xslFileNames>
      <xslFile>xsl\header.xsl</xslFile>
      <xslFile>xsl\unittests.xsl</xslFile>
      <xslFile>xsl\modifications.xsl</xslFile>
      <xslFile>xsl\NCoverSummary.xsl</xslFile>

      <xslFile>xsl\compile.xsl</xslFile>

    </xslFileNames>
  </buildReportBuildPlugin>
  <buildLogBuildPlugin />
  <xslReportBuildPlugin description="NCover Report" actionName="NCoverBuildReport" xslFileName="xsl\NCover.xsl"></xslReportBuildPlugin>
</buildPlugins>
Run Code Online (Sandbox Code Playgroud)

文档非常糟糕,我只是在寻找其他东西时偶然发现了这一点.当我在ccnet网站上的一些文档或示例在几分钟内解决了这个问题时,我感到非常高兴.


tay*_*onr 1

该块位于您的发布商部分吗?

这是我的一位出版商的样子:

    <publishers>
        <merge>
            <files>
                <file>*-results.xml</file>
            </files>
        </merge>
        <xmllogger />
    </publishers>
Run Code Online (Sandbox Code Playgroud)