我正在尝试发布从我的纽曼脚本生成的HTML报告,并在Jenkins作业中使用以下设置。
HTML directory to archive : ./newman
Index page[s] : myReport.html
Report title : My Report
我正在工作区的/ newman目录中生成newman报告。但是,在项目仪表板上,我能够看到报告的链接,但是当我单击它时,由于未找到“”,因此在处理报告时显示错误。为什么这会尝试从错误的目录中读取报告?
控制台输出中有一条消息:
Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level
/export/jenkins_slave/workspace/<teamPath>/ProjectName/newman to
/net/<company name>/jenkins_homes/<team path with
/job>/<ProjectName>/builds/2/htmlreports/ReportFolder
记录测试结果
脚本:
always {
sh label: '', script: '''cd /target
tar -czf report.html output'''
emailext attachmentsPattern: '**/target/report.html', body: '''CreateProject_Pipeline - Build # $BUILD_NUMBER - $BUILD_STATUS:
${JELLY_SCRIPT,template="html"}
Check console output at $BUILD_URL to view the results.''',
recipientProviders: [requestor()], subject: 'VDP_CreateProject_Pipeline-API Test Results', to: '[email protected]'
cleanWs()
}
}
我认为您需要更改路径。
要存档的HTML目录:./ newman
/ newman