One can create and use different kind of TestNG listeners. Please refer TestNG documentation for more information and examples.

Tags: testng