2017-08-07 20 views

回答

1

[编辑,以反映成功的解决方法]

This comment on the issue tracker shows a workaround that seems to work

step([ 
    $class : 'RobotPublisher', 
    outputPath : outputDirectory, 
    outputFileName : "*.xml", 
    disableArchiveOutput : false, 
    passThreshold : 100, 
    unstableThreshold: 95.0, 
    otherFiles : "*.png", 
]) 

然而,机器人框架插件目前似乎并没有与管道完全兼容现在:https://issues.jenkins-ci.org/browse/JENKINS-34469

这是与Jenkins生态系统中的many plugins现在一样,尚未更新,但与新的Jenkins管道兼容。 You could potentially create the full compatibility yourself though,如果你有足够的动机。

+1

谢谢,我其实并没有意识到,[此解决方法有效](https://issues.jenkins-ci.org/browse/JENKINS-34469?focusedCommentId=293103&page=com.atlassian.jira.plugin.system .issuetabpanels%3Acomment-一个tabpanel#评论-293103)。 –

+1

我管线仅增加了这一步: '步骤([$类: 'RobotPublisher', disableArchiveOutput:假的, LOGFILENAME: 'log.html', otherFiles: '', outputFileName: '与Output.xml' , outputPath: '报告/', passThreshold:100, reportFileName: 'report.html', unstableThreshold:0]);' **我已经在每个细节发现 “机器人测试总结” 建立与路径到log.html和report.html,这对我来说已经足够了。**还有一个按钮,可以通过图表“Robot Results”。 –

0

我使用了在其他答案中提到的解决方法,但它不会像非管道作业那样显示结果,所以我制作了由pipline作业触发的自由式项目,并将结果文件复制到运行分析。这是蹩脚的,不会跨节点移植,随着时间的推移,作业数量可能会变得混乱,因此相关性可能会非常棘手。在这一点上,我将使用通用神器存储或者完全摆脱机器人来进行调查。

+0

我使用这个groovy片段来重置每个作业的内部编号以便匹配,只需在脚本控制台(http:// yourjenkins/script)中输入它,然后将myjob更改为您的作业名称,然后对每个作业执行此操作即可同步 项= Jenkins.instance.getItemByFullName(“MYJOB) //将删除所有建构历史 item.builds.each(){建立 - > build.delete() } item.updateNextBuildNumber(1) – Amias