Package org.testng
Interface IInvokedMethodListener
-
- All Superinterfaces:
ITestNGListener
public interface IInvokedMethodListener extends ITestNGListener
A listener that gets invoked before and after a method is invoked by TestNG. This listener will be invoked for configuration and test methods irrespective of whether they passe/fail or get skipped. This listener invocation can be disabled for SKIPPED tests through one of the below mechanisms:- Command line parameter
alwaysRunListeners - Build tool
- Via
TestNG.alwaysRunListeners(false)
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidafterInvocation(IInvokedMethod method, ITestResult testResult)default voidafterInvocation(IInvokedMethod method, ITestResult testResult, ITestContext context)To be implemented if the method needs a handle to contextual information.default voidbeforeInvocation(IInvokedMethod method, ITestResult testResult)default voidbeforeInvocation(IInvokedMethod method, ITestResult testResult, ITestContext context)To be implemented if the method needs a handle to contextual information.-
Methods inherited from interface org.testng.ITestNGListener
isEnabled
-
-
-
-
Method Detail
-
beforeInvocation
default void beforeInvocation(IInvokedMethod method, ITestResult testResult)
-
afterInvocation
default void afterInvocation(IInvokedMethod method, ITestResult testResult)
-
beforeInvocation
default void beforeInvocation(IInvokedMethod method, ITestResult testResult, ITestContext context)
To be implemented if the method needs a handle to contextual information.- Parameters:
method- The invoked methodtestResult- The test resultcontext- The test context
-
afterInvocation
default void afterInvocation(IInvokedMethod method, ITestResult testResult, ITestContext context)
To be implemented if the method needs a handle to contextual information.- Parameters:
method- The invoked methodtestResult- The test resultcontext- The test context
-
-