Package org.testng.internal
Class TestListenerHelper
java.lang.Object
org.testng.internal.TestListenerHelper
A helper class that internally houses some of the listener related actions support.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ITestNGListenerFactory
createListenerFactory
(ITestObjectFactory objectFactory, TestNGClassFinder finder, Class<? extends ITestNGListenerFactory> factoryClass, ITestContext context) Deprecated.findAllListeners
(Class<?> cls, IAnnotationFinder finder) static void
runPostConfigurationListeners
(ITestResult tr, ITestNGMethod tm, List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator) static void
runPreConfigurationListeners
(ITestResult tr, ITestNGMethod tm, List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator) static void
runTestListeners
(ITestResult tr, List<ITestListener> listeners) Iterates through a bunch of listeners and invokes them.
-
Method Details
-
runPreConfigurationListeners
public static void runPreConfigurationListeners(ITestResult tr, ITestNGMethod tm, List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator) -
runPostConfigurationListeners
public static void runPostConfigurationListeners(ITestResult tr, ITestNGMethod tm, List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator) -
runTestListeners
Iterates through a bunch of listeners and invokes them.- Parameters:
tr
- - TheITestResult
object that is to be fed into a listener when invoking it.listeners
- - A list ofITestListener
objects which are to be invoked.
-
findAllListeners
public static TestListenerHelper.ListenerHolder findAllListeners(Class<?> cls, IAnnotationFinder finder) - Returns:
- all the @Listeners annotations found in the current class and its superclasses and inherited interfaces.
-
createListenerFactory
@Deprecated public static ITestNGListenerFactory createListenerFactory(ITestObjectFactory objectFactory, TestNGClassFinder finder, Class<? extends ITestNGListenerFactory> factoryClass, ITestContext context) Deprecated.- This method stands deprecated as of TestNG version7.10.0
-
7.10.0