org.testng.IInvokedMethodListener Java Examples

The following examples show how to use org.testng.IInvokedMethodListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestRunnerFactory.java    From qaf with MIT License 5 votes vote down vote up
@Override
public TestRunner newTestRunner(ISuite suite, XmlTest test, Collection<IInvokedMethodListener> listeners,
		List<IClassListener> classListeners) {
	TestRunner runner = null!=testRunnerFactory?testRunnerFactory.newTestRunner(suite, test, listeners, classListeners):
              new TestRunner(configuration, suite, test,
	                  false /*skipFailedInvocationCounts */,
	                  listeners,classListeners);;
	init(runner);
	return runner;
}
 
Example #2
Source File: Helpers.java    From AppiumTestDistribution with GNU General Public License v3.0 5 votes vote down vote up
protected void queueBeforeInvocationListeners(IInvokedMethod iInvokedMethod,
                                              ITestResult iTestResult,
                                              List<ITestNGListener> listeners) {
    for (ITestNGListener listener : listeners) {
        //Lets filter out only IInvokedMethodListener instances.
        if (listener instanceof IInvokedMethodListener) {
            ((IInvokedMethodListener) listener).beforeInvocation(iInvokedMethod, iTestResult);
        }
    }
}
 
Example #3
Source File: Helpers.java    From AppiumTestDistribution with GNU General Public License v3.0 5 votes vote down vote up
protected void queueAfterInvocationListener(IInvokedMethod iInvokedMethod,
                                            ITestResult iTestResult,
                                            List<ITestNGListener> listeners) {
    for (ITestNGListener listener : listeners) {
        //Lets filter out only IInvokedMethodListener instances.
        if (listener instanceof IInvokedMethodListener) {
            ((IInvokedMethodListener) listener).afterInvocation(iInvokedMethod, iTestResult);
        }
    }
}