标签: postman-newman

詹金斯和纽曼 - 报告未显示

我在 JenkinsFile 中定义了以下步骤,该步骤在运行 Jenkins 管道时生成 html 报告:

        stage('Run Integration Tests') {
            steps {
                        dir("${env.WORKSPACE}/test/integration") {
                            sh'''
                                npm install -g newman
                                npm install -g newman-reporter-htmlextra
                                newman run postman_collection.json -e ''' +APIGEE_ENVIRONMENT+'''.postman_environment.json --reporters cli,htmlextra --reporter-htmlextra-export "newman_result.html"
                            '''
                        }
            }
        }
Run Code Online (Sandbox Code Playgroud)

然后我尝试发布此报告,但无论我尝试什么,它都不会显示该报告,而是显示一个空的 html 页面。我可能在配置中弄乱了一些东西,但我现在已经在这个问题上坚持了几个小时了。我希望有人能找到缺失的部分。预先非常感谢您。

        stage('Artifacts') {
            steps {
                publishHTML(target: [
                    alwaysLinkToLastBuild: false,
                    allowMissing: false,
                    keepAll: true,
                    reportDir: "${WORKSPACE}",
                    reportFiles: 'newman_result.html',
                    reportName: 'Integration Test Results',
                    reportTitles: ''
                ])
            }
        }
Run Code Online (Sandbox Code Playgroud)

jenkins jenkins-plugins jenkins-groovy postman-newman

5
推荐指数
1
解决办法
446
查看次数