【问题标题】:Team City - Add Gallio test result xml to build displayTeam City - 添加 Gallio 测试结果 xml 以构建显示
【发布时间】:2011-12-07 09:13:50
【问题描述】:

我正在使用带有Gallio/XUnit/Specflow 的 TeamCity 并尝试显示我们的单元/验收测试结果。我相信输出是NUnitxml测试结果格式。

我们的单元测试使用带有 Gallio 的命令运行程序自动显示。验收测试通过调用 Gallio (Run-Gallio) 的大型 Powershell 脚本运行。

结果输出到acceptance-test-results.xml。有没有办法在TeamCity (6.5.5) 中显示acceptance-test-results.xml?

【问题讨论】:

  • 您忘记指定TeamCity 的版本,因为不同的版本支持不同的报告格式集

标签: nunit teamcity gallio build-server


【解决方案1】:

要在 PowerShell 脚本中执行此操作,请添加以下内容

 Write-Output "##teamcity[importData type='nunit' path='C:\SomeDirectory\YourResults.xml']"

【讨论】:

    【解决方案2】:

    您可以使用内置的 TeamCity 功能importdata 服务消息:

     <!-- Send to TeamCity a service message using MSBuild -->
    <Message Text="##teamcity[importData 
                              type='nunit' 
                              path='$(OutputPath)\UnitTestsReport.xml']" 
             Importance="High" />
    

    更多详情见:Build Script Interaction with TeamCity - Importing XML Reports

    【讨论】:

      【解决方案3】:

      认为这对于其他提出此 SO 帖子但要求略有不同的人也可能有用。这是涵盖该特定领域的 TC 的公共 wiki。

      http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ImportingXMLReports

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-03-27
        • 1970-01-01
        • 1970-01-01
        • 2011-05-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多