更新时间:2022-06-20 21:56:28
对于詹金斯(Jenkins).
For Jenkins..
转到您的Project > Configure > Post-build Actions > Editable Email Notification
.
然后单击Advanced Settings....
有一个名为预发送脚本"的框.
There is a box named Pre-send Script.
def reportPath = build.getWorkspace().child("test-output/emailable-report.html")
msg.setContent(reportPath.readToString(), "text/html");
将其复制并粘贴到框中.然后保存. 这将生成彩色页面,您可以通过电子邮件将其作为报告发送.
Copy that and paste it into the box. Then Save it. That will generate the colourfull page and you can send it as a report via email.