@listeners are used to configure reports and logging in TestNG. One of the most widely used listeners in TestNG is @ITestListener interface. It has methods like onTestStart, onTestSuccess, onTestFailure, onTestSkipped etc. You can implement this interface creating a listener class of our own. Then, you shall add the listeners annotation (@Listeners) in the Class which was created. This way @listener is used in TestNG.