扩展电子邮件通知的"默认内容"设置如下,默认内容类型为"HTML(文本/ html)":
<% if(build.testResultAction) { def testResult = build.testResultAction def testCount = String.format("%.2f",(testResult.totalCount)) def testPassed = String.format("%.2f",()) def testFailed = String.format("%.2f",(testResult.result.failCount)) def testSkipped = String.format("%.2f",()) def buildDuration = String.format("%.2f",(testResult.result.duration )) } %> Hi All,
The execution of the Automation suite has been completed and the results are as below.
Configuration :
Project Name : $JOB_NAME
Test Server URL : $Test_Server_URL
Group Name : $Group_Name
Execution Results :
Status : $BUILD_STATUS
Tests run : $testCount
Failures : $testFailed
Errors : 0
Skipped : 0
Total time : $buildDuration
Finished at: Tue May 06 17:12:19 IST 2014
Build URL : $BUILD_URL
The HTML version of the automation results and the log file is attached with this e-mail for your reference.
Regards,
Jenkins CI Tool
但是报告电子邮件在其正文中具有groovy代码本身而不是预期值.