6.2 Adding TestNG Report

You are viewing an old version (v. 5) of this page.
The latest version is v. 19, last edited on Aug 06, 2009 (view differences | )
<< View previous version | view page history | view next version >>

To add TestNG report, you only need two steps:

  1. Generate TestNG XML report (the TestNG also supports generate JUnit style report) from Ant or Maven or any other build tool.
  2. Publish TestNG report(s) in the [configuration].

Generate TestNG Report

QuickBuild will NOT generate TestNG reports automatically, so first make sure the TestNG report is produced by ANT or by any other build tool. The following example shows how to generate TestNG test results with Ant TestNG task:

JUnit target in build.xml
<testng classpathref="run.cp"
        outputDir="${testng.report.dir}"
        sourcedir="${test.src.dir}"
        haltOnfailure="true">
 
   <xmlfileset dir="${test14.dir}" includes="testng.xml"/>
</testng>

By default, TestNG will create both XML and HTML reports. You can customize the report listener for TestNG to generate the reports, the detailed information can be referred to TestNG webiste.

Publish TestNG Report

To publish TestNG report is fairly simple, just tell QuickBuild where the TestNG reports exist by inputting the file pattern which is a relative path based on the workspace directory.
Unable to render embedded object: File (report_publish_step.png) not found.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.