Importance of TestNG Reports
Posted By : Sakshi Dewan Gandhi | 08-Feb-2018
The Primary thing you should know before making TESTNG Reports is what is TestNg. So, Testng is a unit testing framework, which is used for making unit testing scripts. TestNg is a framework which is inspired by Junit and Nunit and more addon features than that. This framework can be used in IDE such as selenium or STS.
Now, we should know the purpose of Reporting. Well! Reports are beneficial to show the pass/fail Results of the tests you performed, and Testing can be made more explanatory, more meaningful if the user is able to see it in a more interactive format.
TestNG is a library which provides a very handy reporting feature. After the execution of the project Run it as TestNg Class. Now, Refresh the project. Now Reopen the folder, you can see a folder named: Output at the root of the project. This folder contains two types of reports: Index.html Report and Emailable-report.html. TestNg also provides features to display the reports in .pdf, excel formats and different layout.
Following is a sample file, you can view it and make use of this feature in your automation Project. Following Blog image depicts a TestResult having two methods: one fail one passed, and Exception depiction in the right side.
TestNG library provides a very handy reporting feature. After execution, it will generate a test-output folder at the root of the project. This folder contains two type of Reports-
Index.html: This is the complete report of current execution which contains information like an error, groups, time, reporter logs, testng XML files.
Emailable-report.html: This is the summarized report of the current test execution which contains the test case message in green (for pass test cases) and red(for failed test cases) highlight.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Sakshi Dewan Gandhi
Sakshi has experience into Testing, which comprises of Functional, Performance and End-to end-System Testing. She has worked in various domains like: Telecom, E-Commerce, E-Learning and Language Translation.