The TestNG Listener class

In order to provide test results to the IDE console, or to a log file, users must build a test listener class into their framework. There are many open source classes available for use, as well as a TestNG class called TestListenerAdapter, which can be extended to provide custom logging information in real time. In other words, users can get results while the tests are running by logging them to the console, or by logging the data to a file.

How do you use it? How does it keep track of all the test results while the suite of tests are running? How does it get automatically called in a Selenium Framework Test Suite run? These questions will be answered in this section.