How to Use TestNG Metric Report

Create a Simple XML file for run java file using the TestNG

Just you need to add few parameters .

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "" >
<suite name="Suite_name" parallel="false">
<parameter name="" value = "image_file_path"/>
<parameter name="" value = "web.html"/>
<parameter name="" value = "True"/>
  <test name="Test">
      <class name="package_name.file_name"/>
  </test> <!-- Test -->
</suite> <!-- Suite -->

Run as TestSuite

Refresh The test-output after complete the test you will get the html file.


Select the html file starts with “web” open the with web browser.



We hope you guys have learned by reading this article.

Let us know if you have come across any other scenarios where you have found a better way to effectively implement this method. Also, if you have any questions, feel free to reach out to us via the comment section below.

:heart: Happy Testing :heart: