Package org.testng.internal.invokers
Class MethodInvocationHelper
java.lang.Object
org.testng.internal.invokers.MethodInvocationHelper
Collections of helper methods to help deal with invocation of TestNG methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
invokeConfigurable
(Object instance, Object[] parameters, IConfigurable configurableInstance, Method thisMethod, ITestResult testResult) invokeDataProvider
(Object instance, Method dataProvider, ITestNGMethod method, ITestContext testContext, Object fedInstance, IAnnotationFinder annotationFinder) protected static boolean
invokeHookable
(Object testInstance, Object[] parameters, IHookable hookable, Method thisMethod, ITestResult testResult) protected static Object
invokeMethod
(Method thisMethod, Object instance, Object[] parameters) protected static Object
invokeMethod
(Method thisMethod, Object instance, List<Object> parameters) protected static void
invokeMethodConsideringTimeout
(ITestNGMethod tm, ConstructorOrMethod method, Object targetInstance, Object[] params, ITestResult testResult, IConfiguration config) protected static Object
invokeMethodNoCheckedException
(Method thisMethod, Object instance, List<Object> parameters) protected static void
invokeWithTimeout
(IConfiguration config, ITestNGMethod tm, Object instance, Object[] parameterValues, ITestResult testResult) Invokes a method on a separate thread in order to allow us to timeout the invocation.protected static boolean
invokeWithTimeout
(IConfiguration config, ITestNGMethod tm, Object instance, Object[] parameterValues, ITestResult testResult, IHookable hookable)
-
Constructor Details
-
MethodInvocationHelper
public MethodInvocationHelper()
-
-
Method Details
-
invokeMethodNoCheckedException
-
invokeMethodConsideringTimeout
protected static void invokeMethodConsideringTimeout(ITestNGMethod tm, ConstructorOrMethod method, Object targetInstance, Object[] params, ITestResult testResult, IConfiguration config) throws Throwable - Throws:
Throwable
-
invokeMethod
protected static Object invokeMethod(Method thisMethod, Object instance, List<Object> parameters) throws InvocationTargetException, IllegalAccessException -
invokeMethod
protected static Object invokeMethod(Method thisMethod, Object instance, Object[] parameters) throws InvocationTargetException, IllegalAccessException -
invokeDataProvider
public static Iterator<Object[]> invokeDataProvider(Object instance, Method dataProvider, ITestNGMethod method, ITestContext testContext, Object fedInstance, IAnnotationFinder annotationFinder) -
invokeHookable
protected static boolean invokeHookable(Object testInstance, Object[] parameters, IHookable hookable, Method thisMethod, ITestResult testResult) throws Throwable - Throws:
Throwable
-
invokeWithTimeout
protected static void invokeWithTimeout(IConfiguration config, ITestNGMethod tm, Object instance, Object[] parameterValues, ITestResult testResult) throws InterruptedException, ThreadExecutionException Invokes a method on a separate thread in order to allow us to timeout the invocation. It uses as implementation anExecutor
and aCountDownLatch
. -
invokeWithTimeout
protected static boolean invokeWithTimeout(IConfiguration config, ITestNGMethod tm, Object instance, Object[] parameterValues, ITestResult testResult, IHookable hookable) throws InterruptedException, ThreadExecutionException -
invokeConfigurable
protected static boolean invokeConfigurable(Object instance, Object[] parameters, IConfigurable configurableInstance, Method thisMethod, ITestResult testResult) throws Throwable - Throws:
Throwable
-