生成实时吸引力报告

时间:2021-02-17 17:19:59

标签: jenkins-pipeline allure

我希望能够在完成所有测试之前在诱惑报告中查看一些测试结果。所以我并行化了测试的运行,并生成了诱人的结果,如下所示:

parallel([
                            tests: {
                                stage('Tests') {
                                    try {
                                        ...
                                    }
                                    finally (err) {
                                        areTestsDone = true
                                        throw err
                                    }
                                }
                            },
                            AllureReport : {
                                stage("Allure report") {
                                    container('python') {
                                        sh """chmod -R o+xw ${params.testPath}/my_allure_results"""
                                    }
                                    while(!areTestsDone) {
                                        sleep 60
                                        script {
                                                   allure([
                                                           includeProperties: false,
                                                           jdk              : 'Java SE 8u141',
                                                           properties       : [],
                                                           reportBuildPolicy: 'ALWAYS',
                                                           results          : [[path: "${params.testPath}/my_allure_results"]]
                                                   ])
                                               }
                                   }
                                }
                            }
                        ])

这有效,但我现在的问题是它会生成多个诱惑报告:

enter image description here

enter image description here

我的目标是每次替换诱惑报告(每次构建只有一个)。

有没有办法做到这一点?或者有没有更好的方法来每次运行生成诱惑报告?

0 个答案:

没有答案
相关问题