Package org.testng.internal
Class TestListenerHelper
- java.lang.Object
-
- org.testng.internal.TestListenerHelper
-
public final class TestListenerHelper extends java.lang.ObjectA helper class that internally houses some of the listener related actions support.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestListenerHelper.ListenerHolder
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ITestNGListenerFactorycreateListenerFactory(ITestObjectFactory objectFactory, TestNGClassFinder finder, java.lang.Class<? extends ITestNGListenerFactory> factoryClass, ITestContext context)Deprecated.- This method stands deprecated as of TestNG version7.10.0static TestListenerHelper.ListenerHolderfindAllListeners(java.lang.Class<?> cls, IAnnotationFinder finder)static voidrunPostConfigurationListeners(ITestResult tr, ITestNGMethod tm, java.util.List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator)static voidrunPreConfigurationListeners(ITestResult tr, ITestNGMethod tm, java.util.List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator)static voidrunTestListeners(ITestResult tr, java.util.List<ITestListener> listeners)Iterates through a bunch of listeners and invokes them.
-
-
-
Method Detail
-
runPreConfigurationListeners
public static void runPreConfigurationListeners(ITestResult tr, ITestNGMethod tm, java.util.List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator)
-
runPostConfigurationListeners
public static void runPostConfigurationListeners(ITestResult tr, ITestNGMethod tm, java.util.List<IConfigurationListener> listeners, IConfigurationListener internal, ListenerComparator comparator)
-
runTestListeners
public static void runTestListeners(ITestResult tr, java.util.List<ITestListener> listeners)
Iterates through a bunch of listeners and invokes them.- Parameters:
tr- - TheITestResultobject that is to be fed into a listener when invoking it.listeners- - A list ofITestListenerobjects which are to be invoked.
-
findAllListeners
public static TestListenerHelper.ListenerHolder findAllListeners(java.lang.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, java.lang.Class<? extends ITestNGListenerFactory> factoryClass, ITestContext context)
Deprecated.- This method stands deprecated as of TestNG version7.10.0
-
-