TestNG Tutorial #15 – What are TestNG Listeners

In this TestNG tutorial we will learn What are TestNG Listeners. TestNG provides @Listeners annotation to implement listeners in your test cases.

TestNG listeners listen to every event that occurs in the Selenium Test Case. Listeners modify the TestNG behavior which helps to redirect to new block of code based on certain events in your tests, for example, capture screenshot if test case failed.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.