Using Listeners
In this topic, we will see the list of TestNG Listeners.
We'll cover the following...
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 method- alterto alter the test suite
- IAnnotationTransformer- on implementing this interface, we can alter- @Test,- @DataProvider,- @Factory, @Listener annotations
- IClassListener- on implementing this interface, we can call- onBeforeClassand- onAfterClass
- IConfigurable- on implementing the interface,- run