HTML Publisher
系统管理-插件管理-可选插件,搜索:HTML Publisher
勾选HTML Publisher,点【直接安装】
安装完成,已安装,可以查看刚才安装的插件;
执行shell
执行shell里面配置生成pytest的报告,运行完成后在当前目录下生成一个a.html报告;(注意:需要创建report文件夹,不然会报错:
Specified HTML directory '/var/jenkins_home/workspace/pytest_reqeusts_1202/report' does not exist.)
构建后操作
添加构建后操作,选择Publish HTML reports插件
- HTML directory to archive 是上面生成html报告的文件夹地址:report
- Index page[s] 报告的名称:a.html
- Report title 显示在jenkins左侧的名称,默认:HTML Report
立即构建,报错
[htmlpublisher] Archiving at PROJECT level /var/jenkins_home/workspace/pytest_reqeusts_1202/report to /var/jenkins_home/jobs/pytest_reqeusts_1202/htmlreports/HTML_20Report ERROR: Directory '/var/jenkins_home/workspace/pytest_reqeusts_1202/report' exists but failed copying to '/var/jenkins_home/jobs/pytest_reqeusts_1202/htmlreports/HTML_20Report'
未百度到答案;