Test – How do I use TestNG to generate XML reports in JUnit style?

I am using the TestNG framework for integration testing. I want to use TestNG to generate JUnit style XML reports. My project does not use Ant, but we use Maven. Can you tell me JUnit style XML What is the format of the JUnit XML file and how to use the TestNG API to generate a JUnit XML file. Later I wanted to integrate this JUnit XML file with Hudson, and I even wanted to use TestNG to customize this JUnit XML report.

So how do I accomplish the above tasks?

TestNG has generated these files, please check under test-output/junitreports.

I am using the TestNG framework for integration testing. I want to use TestNG to generate JUnit style XML reports. My project does not use Ant, but we use Maven. Can you tell me what the format of JUnit style XML is? The same, and how to use TestNG API to generate JUnit XML files. Later I want to integrate this JUnit XML file with Hudson, I even want to use TestNG to customize this JUnit XML report.

Then I should How to accomplish the above tasks?

TestNG has generated these files, please check under test-output/junitreports.

Leave a Comment

Your email address will not be published.