1. 程式人生 > 其它 >jenkins 傳送testng測試結果

jenkins 傳送testng測試結果

jenkins  傳送testng測試結果:

1、構建後操作新增 publish testng results,沒有的可以先去安裝外掛

 2、郵箱內容配置如下

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
            <title>${PROJECT_NAME}-第${BUILD_NUMBER}次構建日誌</title>
        </head>

        <body leftmargin="8"
marginwidth="0" topmargin="2" marginheight="4" offset="0"> <table width="95%" cellpadding="0" cellspacing="0" style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif"> <tr> <td> <
h2> <font color="#0000FF">構建結果 - ${BUILD_STATUS}</font> <br> <font size="2">(本郵件是程式自動下發的,請勿回覆!)</font> </h2> </td> </
tr> <tr> <td> <br /> <b> <font color="#0B610B">構建資訊</font> </b> <hr size="2" width="100%" align="center" /> </td> </tr> <tr> <td> <ul> <li>專案名稱 : ${PROJECT_NAME}</li> <li>構建編號 : 第${BUILD_NUMBER}次構建</li> <li>觸發原因: ${CAUSE}</li> <li>構建日誌: <a href="${BUILD_URL}console">${BUILD_URL}console</a> </li> <li>構建 Url : <a href="${BUILD_URL}">${BUILD_URL}</a> </li> <li>工作目錄 : <a href="${PROJECT_URL}ws">${PROJECT_URL}ws</a> </li> <li>專案 Url : <a href="${PROJECT_URL}">${PROJECT_URL}</a> </li> </ul> <br /> </td> </tr> <tr> <td> <b> <font color="red">Test Informations</font> </b> <hr size="2" width="100%" align="center" /> </td> </tr> <div align="left"> <table border="2" cellspacing="0" width="400"> <tr> <th width="200px"> <font size="3">Total</font> </th> <th width="200px"> <font size="3">Pass</font> </th> <th width="200px"> <font size="3">Failed</font> </th> <th width="200px"> <font size="3">Skiped</font> </th> </tr> <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';"> <td align="center"> <font size="3">${TEST_COUNTS,var="total"}</font> </td> <td align="center"> <font size="3">${TEST_COUNTS,var="pass"}</font> </td> <td align="center"> <font color="red" size="3"> <b>${TEST_COUNTS,var="fail"}</b> </font> </td> <td align="center"> <font size="3">${TEST_COUNTS,var="skip"}</font> </td> </tr> </table> </div> <br /> <tr> <td> <br /> <b> <font color="red" size="2"> 詳細內容見測試報告:</font> </b> <a href="${BUILD_URL}allure">${BUILD_URL}allure</a> </td> </tr> </table> </body> </html>