简体   繁体   English

如何在TeamCity上显示DUnitX结果

[英]How can i show DUnitX results on TeamCity

I have been trying to fiddle around within my instance of TeamCity to try and get a Tests tab to display at the end of each build. 我一直在尝试在TeamCity实例中摆弄,以尝试在每个构建的末尾显示“ 测试”选项卡。 My current build configuration is as follows: 我当前的构建配置如下:

  • [Powershell] Set version of delphi application [Powershell]设置版本的delphi应用程序
  • [Command Line] Build application dproj [命令行]构建应用程序dproj
  • [Command Line] Build dunitx-test dproj && run dunitx executable [命令行]构建dunitx-test dproj &&运行dunitx可执行文件
  • [Powershell] Zip contents -> Create nuget package [Powershell] Zip内容->创建nuget包
  • [Octopus] Publish [章鱼]发布
  • Publish to TeamCity dunitx-results.xml 发布到TeamCity dunitx-results.xml

Reading through the DUnitX Documentation they state that the output is compatible with NUnit. 通读DUnitX文档,他们指出输出与NUnit兼容。 So what I am trying to do is at the end of the building process that TeamCity displays my test results on its own tab. 因此,我想做的是在构建过程结束时,TeamCity在其自己的选项卡上显示我的测试结果。 Similar to how NUnit tests results are exposed after a Visual Studio Build using NUnit or MSTest. 与在使用NUnit或MSTest的Visual Studio构建后公开NUnit测试结果的方式类似。

Does anyone know how I can accomplish this, or get a similar output? 有谁知道我如何做到这一点,或获得类似的输出?

In case this helps anyone else, I was able to get the Tests to finally show thanks to the responses found in this questions here 万一这对其他人有帮助,我可以通过这里的问题中的回答最终使测试得以展示

TeamCity lets you output to the screen content based on its own commands in several different ways explained in their documentation . 通过TeamCity,您可以根据自己的命令以其文档中介绍的几种不同方式将内容输出到屏幕。

Since I am running my tests from the command line I just had to add the following line to my Test Step 由于我是从命令行运行测试,因此只需将以下行添加到“ 测试步骤”中

echo ##teamcity[importData type='nunit' path='Tests\\Win32\\Release\\bin\\dunitx-results.xml'] 回声## teamcity [importData type ='nunit'path ='Tests \\ Win32 \\ Release \\ bin \\ dunitx-results.xml']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM