2017-08-07 21 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