如何在Jenkins WEB GUI中显示生成的trx文件? [英] How to display generated trx files in Jenkins WEB GUI?

查看:64
本文介绍了如何在Jenkins WEB GUI中显示生成的trx文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在目录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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆