【问题标题】:CruiseControl.NET Visual Studio Test Cases not showing up on dashboardCruiseControl.NET Visual Studio 测试用例未显示在仪表板上
【发布时间】:2010-07-02 03:37:25
【问题描述】:

我正在使用 CruiseControl.NET 在项目构建后运行 Visual Studio 测试用例。在原始 xml 日志中,我可以看到它运行测试用例并说明哪些通过,哪些失败,但是在 CruiseControl 仪表板上,它只显示:

9 个项目构建时完全没有警告 :-) 剧中!!!

这是我的项目块的样子:

<project name="projectname" queue="queuename" queuePriority="2">
    <workingDirectory>C:\Build</workingDirectory>
    <category>categoryname</category>
    <webURL>http://myurl/ViewProjectReport.aspx</webURL>
    <triggers>
      <intervalTrigger seconds="60" />
    </triggers>
    <modificationDelaySeconds>60</modificationDelaySeconds>
    &sc;
    <tasks>
      <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
        <workingDirectory>C:\mypath</workingDirectory>
        <projectFile>project.sln</projectFile>
        <buildArgs>/v:quiet /noconlog /p:Configuration=Debug</buildArgs>
        <targets>Build</targets>
        <timeout>900</timeout>
        <logger>C:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
      </msbuild>
      <exec>
        <executable>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\mstest.exe</executable>
        <baseDirectory>C:\Build\Test\TestCases\</baseDirectory>
        <buildArgs>/testcontainer:testproject\bin\debug\testproject.dll /runconfig:localtestrun.Testrunconfig</buildArgs>
        <buildTimeoutSeconds>900</buildTimeoutSeconds>
      </exec>
    </tasks>
    <publishers>
      <xmllogger logDir="C:\Program Files\CruiseControl.NET\Logs\Navtrak\H4CommandProcess\" />
    </publishers>
  </project>

如何让通过/失败的测试用例显示在该特定构建的 Cruisecontrol 仪表板页面上?

谢谢, 贾斯汀

【问题讨论】:

    标签: cruisecontrol.net


    【解决方案1】:

    有关如何让 MSTest 结果出现在 CruiseControl.Net 中的一些提示,请参阅本文:

    http://confluence.public.thoughtworks.org/display/CCNET/Using+CruiseControl.NET+with+MSTest

    基本上你需要做的是:

    • 获取 MSTest 以将其测试结果保存到 xml (.trx) 文件(您的原始构建输出可能会以测试格式显示测试结果,但 CruiseControl.net 需要 xml 格式的结果)
    • 获取 CruiseControl.Net 以将此 xml 文件合并到您的巡航控制构建日志中。
    • 添加一个额外的构建报告,该报告使用 XSLT 显示将 xml 测试结果转换为漂亮的 html。

    上述文章更详细地介绍了如何执行此操作,以及一些额外的注意事项(例如删除旧的测试结果)。

    另外,我注意到您使用的是 Visual Studio 2009 - 上述文章没有强调的是,当您设置仪表板以显示 MSTest 结果时,您需要确保使用 VS2009 特定的 xslt在 CruiseControl.Net 目录中,因为标准版不会在仪表板上显示任何结果。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-10
      • 1970-01-01
      • 1970-01-01
      • 2023-03-30
      • 2018-03-01
      • 1970-01-01
      • 2017-11-18
      • 1970-01-01
      相关资源
      最近更新 更多