views:

291

answers:

2
+2  Q: 

Junit HTML report

Is there a way to (easily) generate a HTML report that contains the tests results ? I am currently using JUnit in addition to Selenium for testing web apps UI.

PS: Given the project structure I am not supposed to use ANT :(

+3  A: 

If you could use ANT then you would just use the JUnitReport task as detailed here: http://ant.apache.org/manual/OptionalTasks/junitreport.html, but you mentioned in your question that you're not supposed to use ANT. I believe that task merely transforms the XML report into HTML so it would be feasible to use any XSLT processor to generate a similar report.

Alternatively, you could switch to using TestNG ( http://testng.org/doc/index.html ) which is very similar to JUnit but has a default HTML report as well as several other cool features.

Dave Hunt
Thanks for your answer! I will try to convince the staff that we need ANT, and the whole idea of an IDE-Centric project is bad.
Andrei Ciobanu
A: 

Alternatively for those using Maven build tool, there is a plugin called Surefire Report.

The report looks like this : Sample

h3xStream