2017-02-13 58 views
3

我有一個Jenkins 2.0管道腳本,它運行兩個獨立的機器人測試套件。該腳本嘗試發佈兩個測試套件結果,但是發佈者會覆蓋第一個發佈和最後一個發佈。從Jenkins管道發佈多個機器人測試結果

node('robot') { 
    ... 
    publishTestResults('journey') 
    publishTestResults('regression') 
} 

void publishTestResults(String type) { 
step([ 
     $class   : 'hudson.plugins.robot.RobotPublisher', 
     outputPath  : 'portfolio-app\\target\\robot-output\\' + type, 
     passThreshold : 100, 
     unstableThreshold: 100, 
     otherFiles  : '', 
     reportFileName : '*\\report*.html', 
     logFileName  : '*\\log*.html', 
     outputFileName : '*\\output*.xml' 
]) 

}

從UI,我們看到了兩個結果公佈,但兩組都爲regression測試用例。最後一次發佈勝出。

enter image description here

有我們發佈了兩套機器人結果的任何方式。

回答

1

這不會直接回答你的問題,但它是你試圖完成的一個可能的解決方案。

您可以使用rebot將兩組機器人結果合併爲一個。然後發佈合併報告。關於如何合併報告,有許多選項可供選擇。

+0

謝謝。你有關於如何做到這一點的文件?這真的是一個倒退選項。這將是理想的兩個測試套件結果分開。 – timmy

+2

文檔可以在這裏找到:http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#using-robot-and-rebot-scripts「rebo​​t --help」將提供許多選項的列表。在將結果帶入jenkins之前,我通常使用類似'rebot -o combined.xml -r combinedreport.html -l combinedlog.html -x combined.xunit **/*。xml'的東西。 –