Team City - Add Gallio test result xml to build display

岁酱吖の 提交于 2019-12-08 01:32:09

问题


Im using TeamCity with Gallio/XUnit/Specflow and trying to display our unit/acceptance test results. I believe the output is NUnit xml test result format.

Our unit tests auotmatically display using the command runner with Gallio. The acceptance tests are run through a large Powershell script which calls Gallio (Run-Gallio).

Results are output to acceptance-test-results.xml. Is there a way to display the acceptance-test-results.xml in TeamCity (6.5.5)?


回答1:


To do this in a PowerShell script add the following

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



回答2:


You can use built in TeamCity feature importdata service message:

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

For more details see: Build Script Interaction with TeamCity - Importing XML Reports




回答3:


Thought this might be useful also for other people that came to this SO post with slightly different requirements. It's the public wiki for TC that covers this particular area.

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



来源:https://stackoverflow.com/questions/8412815/team-city-add-gallio-test-result-xml-to-build-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!