I use email-ext-plugin to generate report in hudson, and check the templete html.jelly in $HUDSON_ROOM\plugins\email-ext\WEB-INF\classes\hudson\plugins\emailext\templates\html.jelly, but i don't how to add the testng testing result into this jelly file.
the junit script in html.jelly, could someone know the script meaning for example, what's the meaning of it.JUnitTestResult? where the "it" object variable come from?
<j:set var="junitResultList" value="${it.JUnitTestResult}" />
<j:if test="${junitResultList.isEmpty()!=true}">
<TABLE width="100%">
<TR><TD class="bg1" colspan="2"><B>JUnit Tests</B></TD></TR>
<j:forEach var="junitResult" items="${it.JUnitTestResult}">
<j:forEach var="packageResult" items="${junitResult.getChildren()}">
<TR><TD class="bg2" colspan="2"> Name: ${packageResult.getName()} Failed: ${packageResult.getFailCount()} test(s), Passed: ${packageResult.getPassCount()} test(s), Skipped: ${packageResult.getSkipCount()} test(s), Total: ${packageResult.getPassCount()+packageResult.getFailCount()+packageResult.getSkipCount()} test(s)</TD></TR>
<j:forEach var="failed_test" items="${packageResult.getFailedTests()}">
<TR bgcolor="white"><TD class="test_failed" colspan="2"><B><li>Failed: ${failed_test.getFullName()} </li></B></TD></TR>
</j:forEach>
</j:forEach>
</j:forEach>
</TABLE>
<BR/>
</j:if>
it is a reference to the ScriptContentBuildWrapper class.
${it.JUnitTestResult} returns a List<TestResult> object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With