本次基于《jenkins 生成HTML报表,邮件推送》的基础上将生成HTML报表修改为Allure生成报表,可以参考官方文档:https://docs.qameta.io/allure/#_jenkins
1.启动tomcat登录jenkins
2.Install the latest version of Allure Plugin from "Plugin Manager" page.
3.(1)Open Plugin Advanced Settings (at <your_jenkins_host>/pluginManager/advanced).
(2) Click "Check Updates" button on the bottom right corner of the page.
4.Configure Allure Commandline from "Global Tools Configuration".全局配置
Fill the name and choose the version in the "From Maven Central" dropdown.
4.配置任务
(1) Open job configuration page.
(2) Ensure that your build generates some data in one of the formats digestible for Allure Commandline tool.
(3) Add Allure Report post build action.
5.Configure the Allure Report.
6.配置邮件下发内容,仅供参考
项目名称:$PROJECT_NAME</br> 构建编号:$BUILD_NUMBER</br> svn版本号:${SVN_REVISION}</br> 构建状态:$BUILD_STATUS</br> 触发原因:${CAUSE}</br> 测试报告:${JOB_URL}allure/</br> 构建日志地址:${BUILD_URL}console</br> 构建地址:$BUILD_URL</br> 构建报告:${BUILD_URL}testReport</br>
7.点击立即构建后查看控制台输出(邮件配置请参考上一篇文章:https://www.cnblogs.com/xiaozhaoboke/p/11017600.html)
.............................................
8.邮件展示
9.访问报表展示
10. report报表相比之前的HTML报表是不是更漂亮了呢!
不足之处,请大神指出,后续修正!