本次基於《jenkins 生成HTML報表,郵件推送》的基礎上將生成HTML報表修改成Allure生成報表,能夠參考官方文檔:https://docs.qameta.io/allure/#_jenkinshtml
1.啓動tomcat登陸jenkinstomcat
2.Install the latest version of Allure Plugin from "Plugin Manager" page.svn
3.(1)Open Plugin Advanced Settings (at <your_jenkins_host>/pluginManager/advanced).post
(2) Click "Check Updates" button on the bottom right corner of the page.測試
4.Configure Allure Commandline from "Global Tools Configuration".全局配置ui
Fill the name and choose the version in the "From Maven Central" dropdown.url
4.配置任務spa
(1) Open job configuration page.3d
(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報表是否是更漂亮了呢!
不足之處,請大神指出,後續修正!