显示 Jenkins 管道中多次 TestNG 运行的结果



我正在使用 Jenkins 管道运行 2 个运行列表,例如 test-1.xml 和 test-2.xml。

现在,我希望下面的代码发布运行列表 test-1.xml 和 test-2 的结果.xml

step([$class: 'Publisher', reportFilenamePattern:' **/test-1/testng-results.xml'])

用逗号分隔运行列表似乎不起作用。

in Jenkins testNG 插件源代码

/**
* look for testng reports based in the configured parameter includes.
* 'filenamePattern' is
*   - an Ant-style pattern
*   - a list of files and folders separated by the characters ;:,
*
* NOTE: based on how things work for emma plugin for jenkins
*/

所以你只需要

step([$class: 'Publisher', reportFilenamePattern:' **/test-1/testng-results.xml, **/test-2/testng-results.xml'])

它适用于我的 Jenkins 管道

相关内容

最新更新