in Selenium by
What is the use of @Listener annotation in TestNG?

1 Answer

0 votes
by

Ans. TestNG listeners are used to configure reports and logging. One of the most widely used listeners in TestNG is ITestListener interface. It has methods like onTestStart, onTestSuccess, onTestFailure, onTestSkipped etc. We should implement this interface creating a listener class of our own. Next, we should add the listeners annotation (@Listeners) in the Class which was created.

Related questions

+1 vote
asked Aug 22, 2019 in Selenium by john ganales
+1 vote
asked Aug 22, 2019 in Selenium by john ganales
0 votes
asked Aug 19, 2019 in Selenium by rahulsharma
...