How can I generate an HTML report for Junit results?

Andrei Ciobanu picture Andrei Ciobanu · Mar 5, 2010 · Viewed 130.7k times · Source

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 :(

Answer

IanNorton picture IanNorton · Jun 21, 2016

I found the above answers quite useful but not really general purpose, they all need some other major build system like Ant or Maven.

I wanted to generate a report in a simple one-shot command that I could call from anything (from a build, test or just myself) so I have created junit2html which can be found here: https://github.com/inorton/junit2html

You can install it by doing:

pip install junit2html