public interface IMethodInterceptor extends ITestNGListener
An instance of this class will be invoked right before TestNG starts invoking test methods.
Only methods that have no dependents and that don't depend on any other test methods will
be passed in parameter. Implementers of this interface need to return a list of
that represents the list of test methods they want run. TestNG will run these methods in the
same order found in the returned value.
Typically, the returned list will be just the methods passed in parameter but sorted differently, but it can actually have any size (it can be empty, it can be of the same size as the original list or it can contain more methods).
ITestContext is passed in the intercept method so that implementers can set user values
IAttributes.setAttribute(String, Object)), which they can then look up
later while generating the reports.
Copyright © 2013. All Rights Reserved.