Publish Multiple Robot Test Results From Jenkins Pipeline

拜拜、爱过 提交于 2019-12-04 08:14:30

This will not answer your question directly, but it is a possible solution to what you are trying to accomplish.

You can use rebot to combine your two sets of Robot results into one. And then just publish the merged report. There are lots of options with rebot on how to merge reports.

I used a workaround that I publish results only once after all test sets are executed.

Output file and report parameters are set as **/.ext.

Not perfect but it seems it works - I have one 'Robot table' and reports, logs, ... are accessible in subfolders.

stage('Smoke tests'){
    steps {        
        bat('pybot --nostatusrc --outputdir ./robot_reports/smoke <other parameters>')
     }
}

stage('E2E tests'){
    steps {
        bat('pybot --nostatusrc --outputdir ./robot_reports/e2e <other parameters>')
      }
}

stage('Publish Robot results') {
    steps {
        script {
          step(
            [
              $class              : 'RobotPublisher',
              outputPath          : 'robot_reports',
              outputFileName      : "**/output.xml",
              reportFileName      : '**/report.html',
              logFileName         : '**/log.html',
              disableArchiveOutput: false,
              passThreshold       : "${env.ROBOT_PASS_THRESHOLD}" as double,
              unstableThreshold   : "${env.ROBOT_UNSTABLE_THRESHOLD}" as double,
              otherFiles          : "**/*.png,**/*.jpg",
            ]
          )
        }
  }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!