Configure reportng for testng

Source: Internet
Author: User

REPORTNG is a simple framework testng the unit test framework that replaces the default testng HTML report to generate HTML report. You can also use the TESTNG listener to freely configure HTML report.

STEP1: Add the following jar package to your own project

Reportng-1.1.4.jar
Velocity-dep-1.4.jar
Guice-3.0.jar

Schemas such as:

STEP2: For reportng to take effect, we need to disable the default testng listener

1. Enter Eclipse,windows->properties

2. Click testng

3. Select Disable Default listeners, and enter Org.uncommons.reportng.HTMLReporter to pre Defined listeners

4. Click OK to make the changes effective

Step 3: We need to add the following 2 listeners to the Testng.xml file

< Listeners >      <  class-name= "Org.uncommons.reportng.HTMLReporter"/>      <  class-name= "Org.uncommons.reportng.JUnitXMLReporter"/>< /listeners>

STEP4: Click testng to run our unit test

After the run, we can find our running results under the test-output->html file.

View Test Results

Configuring reportng for testng

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.