• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.testng.internal;
2 
3 import org.testng.IClass;
4 import org.testng.ITestContext;
5 import org.testng.ITestNGMethod;
6 import org.testng.ITestResult;
7 import org.testng.xml.XmlSuite;
8 
9 import java.util.List;
10 import java.util.Map;
11 
12 /**
13  * This class defines an invoker.
14  *
15  * @author <a href="mailto:cedric@beust.com">Cedric Beust</a>
16  */
17 public interface IInvoker {
18 
19   /**
20    * Invoke configuration methods if they belong to the same TestClass
21    * passed in parameter..
22    *
23    * TODO:  Calculate ahead of time which methods should be
24    * invoked for each class.   Might speed things up for users who invoke the same
25    * test class with different parameters in the same suite run.
26    *
27    * @param testClass the class whose configuration methods must be run
28    */
invokeConfigurations(IClass testClass, ITestNGMethod[] allMethods, XmlSuite suite, Map<String, String> parameters, Object[] parameterValues, Object instance)29   public  void invokeConfigurations(IClass testClass,
30                                     ITestNGMethod[] allMethods,
31                                     XmlSuite suite,
32                                     Map<String, String> parameters,
33                                     Object[] parameterValues,
34                                     Object instance);
35 
36   /**
37    * Invoke the given method
38    *
39    * @param testMethod
40    * @param suite
41    * @param parameters
42    * @param groupMethods
43    *
44    * @return a list containing the results of the test methods invocations
45    */
invokeTestMethods(ITestNGMethod testMethod, XmlSuite suite, Map<String, String> parameters, ConfigurationGroupMethods groupMethods, Object instance, ITestContext testContext)46   public List<ITestResult> invokeTestMethods(ITestNGMethod testMethod,
47                                              XmlSuite suite,
48                                              Map<String, String> parameters,
49                                              ConfigurationGroupMethods groupMethods,
50                                              Object instance,
51                                              ITestContext testContext);
52 
53 }
54