Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate JUnit style XML report using TestNG?

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?

like image 625
Anand Garlapati Avatar asked Nov 08 '12 11:11

Anand Garlapati


People also ask

Can we generate JUnit report for the test cases generated in TestNG?

TestNG, by default, generates JUnit XML reports for any test execution (in the test-output folder). We can use these XML report files as input for generating a JUnit HTML report.


1 Answers

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

like image 76
Cedric Beust Avatar answered Nov 15 '22 05:11

Cedric Beust