changes.
| To publish [TestNG|http://www.testng.org] report, you only need two steps: |
| # Generate TestNG *XML* report (the TestNG also supports generate JUnit style report) from [Ant|http://ant.apache.org] or [Maven|http://maven.apache.org] or any other build tool. |
| # Add TestNG report publish steps by choosing step _Publish -> TestNG Report_ from step menu. |
| |
| h2. Generate TestNG Report |
| |
| QuickBuild will NOT generate [TestNG|http://www.testng.org] reports automatically, so first make sure the [TestNG|http://www.testng.org] report is produced by [ANT|http://ant.apache.org] or by any other build tool. The following example shows how to generate TestNG test results with [Ant TestNG task|http://testng.org/doc/ant.html]: |
| {code:xml|title=JUnit target in build.xml} |
| <testng classpathref="run.cp" |
| outputDir="${testng.report.dir}" |
| sourcedir="${test.src.dir}" |
| haltOnfailure="false"> |
| |
| <xmlfileset dir="${test14.dir}" includes="testng.xml"/> |
| </testng> |
| {code} |
| 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|http://testng.org/doc/documentation-main.html#logging-xml-reports]. |
| |
| {note:title=About haltOnfailure} |
| If 'haltOnfailure' in testng task is defined to true, the TestNG reports are not complete. If you want to generate the full reports, set 'haltOnfailure' to false. |
| {note} |
| |
| h2. Publish TestNG Report |
| |
| | Add _*Publish TestNG Report*_ step to your build workflow. If you have several report sets, you can add several publish JUnit steps with different report set names. Reference [this page|Publish Build Reports] for more details. |
| | Add _*Publish TestNG Report*_ step to your build workflow. If you have several report sets, you can add several steps with different report set names. Reference [this page|Publish Build Reports] for more details. |