Using Listeners
In this topic, we will see the list of TestNG Listeners.
We'll cover the following...
TestNG listeners #
There are several interfaces that allow us to change the behavior of TestNG at runtime:
IAlterSuiteListener
- on implementing this interface, we have methodalter
to alter the test suiteIAnnotationTransformer
- on implementing this interface, we can alter@Test
,@DataProvider
,@Factory
, @Listener annotationsIClassListener
- on implementing this interface, we can callonBeforeClass
andonAfterClass
IConfigurable
- on implementing the interface,run
method will