How to generate JUnit style XML report using TestNG?

Anand Garlapati picture Anand Garlapati · Nov 8, 2012 · Viewed 7.4k times · Source

I'm using TestNG framework for our integration testing. I want to generate JUnit style XML report using TestNG. My project does not use Ant but we use Maven. Can you please tell what is the format of JUnit style XML looks like and how to generate JUnit XML files using TestNG API. Later I want to integrate this JUnit XML file with Hudson and I even want to customize this JUnit XML report using TestNG.

So How can I do the above tasks?

Answer

Cedric Beust picture Cedric Beust · Nov 9, 2012

TestNG already generates these files, look under test-output/junitreports.