Class Invoker

  • All Implemented Interfaces:
    IInvoker

    public class Invoker
    extends java.lang.Object
    implements IInvoker
    This class is responsible for invoking methods: - test methods - configuration methods - possibly in a separate thread and then for notifying the result listeners.
    Author:
    Cedric Beust, Alexandru Popescu
    • Method Detail

      • invokeConfigurations

        public void invokeConfigurations​(IClass testClass,
                                         ITestNGMethod[] allMethods,
                                         XmlSuite suite,
                                         java.util.Map<java.lang.String,​java.lang.String> params,
                                         java.lang.Object[] parameterValues,
                                         java.lang.Object instance)
        Invoke configuration methods if they belong to the same TestClass passed in parameter..

        TODO: Calculate ahead of time which methods should be invoked for each class. Might speed things up for users who invoke the same test class with different parameters in the same suite run. If instance is non-null, the configuration will be run on it. If it is null, the configuration methods will be run on all the instances retrieved from the ITestClass.

        Specified by:
        invokeConfigurations in interface IInvoker
        Parameters:
        testClass - the class whose configuration methods must be run