2017-02-13 103 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'的东西。 –