What are TestNG Reports?
TestNG Reports are the HTML reports which are generated once the test cases are executed using TestNG. These reports help you to identify the information about test cases and the status of a project. TestNG has it's own default way of developing the reports in the transferrable format. TestNG reports in Selenium have three methods:
1-Pass Test
2- Fail Test
3- Skip Test
To check the data about test cases, Report generation is very important when you are doing the Automation Testing as well as for Manual Testing.
By looking at the result, you can easily identify how many test cases are passed, failed and skipped.
By looking at the report, you will come to know what the status of the project is.
How To Generate Emailable-Report In TestNG using test suite file?
It is always recommended to run your project test cases in a controlled way using a testng.xml. If you have million test cases and you want to run only some of test cases then test suite file means testng.xml is life savers. You can exclude/include test case or class whatever you want to do. It will save time as well we generate report only for mentioned test cases. Emailable-reports do not require any extra work from the tester, and they are a part of overall test execution. To generate emailable reports, first, run the testng.xml if you have not already.
- First create a testng.xml file in src/test/resources then write default structure. Here you can define your full test suite or include class/method as you want. This will discuss in other blog in detail.
- Now run TestNG test suite by right click on this file, It will run only those test case which is mentioned in testng.xml file.
- Once execution done, go to test-output folder and open emailble-report.html in any browser.
- This report will give information on success/failed/skipped test case with default parameter of execution time etc.
Thanks for reading!