2

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

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

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

4

3 回答 3

3

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

 Write-Output "##teamcity[importData type='nunit' path='C:\SomeDirectory\YourResults.xml']"
于 2011-12-09T04:24:33.630 回答
2

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

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

有关更多详细信息,请参阅:使用 TeamCity 构建脚本交互 - 导入 XML 报告

于 2011-12-07T16:35:25.713 回答
0

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

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

于 2014-09-22T13:17:19.173 回答