我有一个Jenkins 2.0 Pipeline脚本,运行两个不同的Robot测试套件。脚本尝试发布两个测试套件的结果,但是发布者会用最后一个发布覆盖第一个发布。
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'
])
从用户界面上看,我们看到有两个已发布的结果,但两个集合都是用于回归测试用例。最后一次发布胜出。
有没有办法可以发布两组机器人测试结果。
rebot -o combined.xml -r combinedreport.html -l combinedlog.html -x combined.xunit **/*.xml
的命令,然后将结果带入Jenkins。 - Kenneth E. Bellock