I would like to keep a history of my Junit results, as management would like to keep a record of the progress the development team is making.
I am using ant to do builds and tests of the code. I have succesfully managed to get junit working and then (within ant) I run junitreport over the output to produce HTML frames showing the results.
I would like to be able to store the summary information (total no of Tests, Failures, errors, etc.) to a file (falt file, XML file, whatever!) so that management can then analyse the progress of the team.
Does anyone know how I can achieve this?
Thanks in advance, Dave
Joined: Mar 06, 2001
A JUnit report is generated by running a stylesheet on a TEST-Results.xml file i think. This XML has the information you are looking for and can be extracted by writing your own XSL. So just look for the xml elements that have the pass, failure information and write a xsl template to get that information and write the stuff on to a file using ant.
Joined: Oct 14, 2004
I followed your suggestion and came up with some XSLT to do this. If anyone else is interested here is the code:
If anyone knows how to do the rounding for the success rate percentage in a more elegant way, then please post it here!