How To Generate TestNG Reports | TestNG Tutorial

TestNG Reports:

TestNG Reports come in to the picture once we execute the test cases using TestNG. Once we execute test cases using TestNG, it will generate a default HTML report. Let’s see this process of generating TestNG Reports in detail.

I have created a basic script and mentioned below.

It has three methods namely passTest, failTest and skipTest with @Test annotation.

TestNG.xml file

Execute the testng.xml file and refresh the project. You could see your project similar to the below mentioned image.

TestNG Default Report

Navigate to ‘test-output’ folder. Now you should find a report ”emailable-report.html‘. This is the default report generated by TestNG.

TestNG Default Report

Open emailable -report.html using any browser of your choice. Report will be like as shown below:

TestNG Default Report

You could find the complete TestNG tutorial here.

TestNG Complete Tutorial

If you are not regular reader of my blog then I highly recommend you to signup for the free email newsletter using the below link.

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Leave a Comment

Share via
Copy link
Powered by Social Snap