jenkins发送html测试报告 https://blog.csdn.net/galen2016/article/details/77975965/
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</title> <style type="text/css"> body { margin: 10px 20px; font-size: 14px; font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif; } /*table*/ /*{*/ /*border-collapse: collapse;*/ /*text-align: center;*/ /*font-size: 14px;*/ /*}*/ /*table td, table th*/ /*{*/ /*border: 2px solid #cc6f4a;*/ /*color: #666;*/ /*height: 20px;*/ /*text-align: center;*/ /*padding: 3px 3px;*/ /*}*/ /*table thead th*/ /*{*/ /*background-color: #CCE8EB;*/ /* 100px;*/ /*}*/ /*table tr:nth-child(odd)*/ /*{*/ /*background: #fff;*/ /*}*/ /*table tr:nth-child(even)*/ /*{*/ /*background: #c9dafa;*/ /*}*/ .successBtn { width: 60px; padding:3px; background-color: #58ab48; border-color: #58ab48; color: #fff; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; /* future proofing */ -khtml-border-radius: 10px; /* for old Konqueror browsers */ text-align: center; vertical-align: middle; border: 1px solid transparent; font-weight: 500; /*font-size:125%*/ } .failBtn{ width: 60px; padding:3px; background-color: #ab2e2d; border-color: #ab2e2d; color: #fff; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; /* future proofing */ -khtml-border-radius: 10px; /* for old Konqueror browsers */ text-align: center; vertical-align: middle; border: 1px solid transparent; font-weight: 500; /*font-size:125%*/ } </style> <style> /* Border styles */ .tabNoBorder thead, .tabNoBorder tr { border-top-width: 1px; border-top-style: solid; border-top-color: rgb(211, 202, 221); } .tabNoBorder { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(211, 202, 221); } /* Padding and font style */ .tabNoBorder td, .tabNoBorder th { padding: 5px 10px; font-size: 14px; font-family: Verdana; color: rgb(95, 74, 121); } /* Alternating background colors */ .tabNoBorder tr:nth-child(even) { background: rgb(223, 216, 232) } .tabNoBorder tr:nth-child(odd) { background: #FFF } </style> </head> <body> <div> <table class = "tabNoBorder"> <tr> <th align="center"><br /> <h2>构建信息</h2> </th> </tr> <tr> <td> <ul> <li>项目名称 : ${PROJECT_NAME}</li> <li>触发原因: ${CAUSE}</li> <li>项目 Url : <a href="${PROJECT_URL}">${PROJECT_URL}</a></li> </ul> </td> <!--<td>${JELLY_SCRIPT,template="html"}<br/>--> </tr> </table> </div> <div style="width=80%"> <h2>测试报告</h2> <div >${FILE ,path="/apps/data/*****/workspace/*****/target/report.html"}</div> </div> </body> </html>