我无法通过$ {TEST_COUNTS,var =“ TYPE”}来获得构建结果的数量(例如,总计,通过)
电子邮件内容为
emailext
subject: "Automation Result: Job '${env.JOB_NAME} - ${env.BUILD_NUMBER}'",
body:'''
total:${TEST_COUNTS,var="total"},
pass:${TEST_COUNTS,var="pass"},
fail:${TEST_COUNTS,var="fail"}
''',
to:'$DEFAULT_RECIPIENTS'
我什么都没收到,应该得到正确的号码
答案 0 :(得分:0)
email-ext
插件的令牌TEST_COUNTS
取决于以下两点:
Publish Junit test result report
之前调用Editable email notification
注意:请记住,将Test report XMLs
更改为您的值。例如:target/surefire-reports/*.xml
如果使用管道作为代码,应更改为
junit '<your junit xml report file path>' // example: target/surefire-reports/*.xml
emailext
subject: "Automation Result: Job '${env.JOB_NAME} - ${env.BUILD_NUMBER}'",
body:'''
total:${TEST_COUNTS,var="total"},
pass:${TEST_COUNTS,var="pass"},
fail:${TEST_COUNTS,var="fail"}
''',
to:'$DEFAULT_RECIPIENTS'