We have a home-grown test environment and I've recently added Jenkins Junit to produce nice test trend graphs.
I
am having trouble getting the Junit plugin to give anything other than
100% health. I want the health report to produce bad weather when there
are failures. Below is the simple xml I have created to test with.
Junit produces a 100% sunny health report based on this, when I expect it to report 0% since 1 of 1 test is failing. The test result page shows 1 failure as expected. Everything seems to be working except this health reporting. I'm running version 1.2 of Junit.
Here's the XML file I'm testing with. It is not generated by Junit. I suspected this was a problem and I may have an issue here, but I have not found a resource that shows this is wrong in any way...
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="all_tests" errors="1" tests="1" failures="1" >
<testsuite name="all_tests" errors="1" tests="1" failures="1" >
<testcase classname="myblock" name="mytest " time="30.57" >
<failure> message="testfailed" </failure>
</testcase>
</testsuite>
</testsuites>
A snapshot of the health report, along with 1 test failing out of a total of 1 test - how can this be 100%?