01: package org.testng.internal;
02:
03: import java.util.List;
04: import java.util.Map;
05:
06: import org.testng.IClass;
07: import org.testng.ITestContext;
08: import org.testng.ITestNGMethod;
09: import org.testng.ITestResult;
10: import org.testng.xml.XmlSuite;
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: */
29: public void invokeConfigurations(IClass testClass,
30: ITestNGMethod[] allMethods, XmlSuite suite,
31: Map<String, String> parameters, Object instance);
32:
33: /**
34: * Invoke the given method
35: *
36: * @param testMethod
37: * @param allTestMethods The list of all the test methods
38: * @param methodIndex The index of testMethod in the allTestMethods array
39: * @param suite
40: * @param parameters
41: * @param groupMethods
42: *
43: * @return a list containing the results of the test methods invocations
44: */
45: public List<ITestResult> invokeTestMethods(
46: ITestNGMethod testMethod, ITestNGMethod[] allTestMethods,
47: int methodIndex, XmlSuite suite,
48: Map<String, String> parameters,
49: ConfigurationGroupMethods groupMethods, Object[] instances,
50: ITestContext testContext);
51:
52: }
|