如何在Jenkins WEB GUI中显示生成的trx文件? [英] How to display generated trx files in Jenkins WEB GUI?
问题描述
在目录TestResults
中,构建完成后,我有一堆测试结果文件(*.trx
).
I have a bunch of test result files (*.trx
) after build is complete in directory TestResults
.
是否可以在詹金斯中显示那些测试结果?如何?
我尝试了MSTest Jenkins插件,但每个作业只允许一个trx
文件:(
Is it possible to display those test results in Jenkins? How?
I tried MSTest Jenkins plugin but it allows only one trx
file per job :(
*.trx
文件在每次构建后生成,并以其创建日期命名:YYYY_MM_DD.HH_mm_ss.TRX
因此,名称不断变化(每次重新构建后).
*.trx
files are generated after each build and named with the date they are created: YYYY_MM_DD.HH_mm_ss.TRX
thus names are constantly changing (after each re-build).
有什么想法可以在詹金斯中显示那些测试结果吗?
Any ideas how to display those test results in Jenkins?
推荐答案
使用 xUnit插件与 MSTest插件结合使用.用法示例-
Use the xUnit plugin in conjunction with the MSTest plugin. Sample usage -
xunit(
[MSTest(deleteOutputFiles: true,
failIfNotNew: true,
pattern: '*.trx',
skipNoTestFiles: false,
stopProcessingIfError: true)
])
注意,这希望您的trx文件位于工作空间的根目录中.如果不是,则需要将它们复制到那里.
Note, this expects that your trx files are in the root of your workspace. If they aren't you'll need to copy them into there.
这篇关于如何在Jenkins WEB GUI中显示生成的trx文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!