/
IInvoker.java
57 lines (51 loc) · 2.01 KB
/
IInvoker.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package org.testng.internal;
import java.util.List;
import java.util.Map;
import org.testng.IClass;
import org.testng.ITestContext;
import org.testng.ITestNGMethod;
import org.testng.ITestResult;
import org.testng.xml.XmlSuite;
/**
* This class defines an invoker.
*
* @author <a href="mailto:cedric@beust.com">Cedric Beust</a>
*/
public interface IInvoker {
/**
* 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.
*
* @param testClass the class whose configuration methods must be run
*/
public void invokeConfigurations(IClass testClass,
ITestNGMethod[] allMethods,
XmlSuite suite,
Map<String, String> parameters,
Object[] parameterValues,
Object instance);
/**
* Invoke the given method
*
* @param testMethod
* @param allTestMethods The list of all the test methods
* @param methodIndex The index of testMethod in the allTestMethods array
* @param suite
* @param parameters
* @param groupMethods
*
* @return a list containing the results of the test methods invocations
*/
public List<ITestResult> invokeTestMethods(ITestNGMethod testMethod,
ITestNGMethod[] allTestMethods,
int methodIndex,
XmlSuite suite,
Map<String, String> parameters,
ConfigurationGroupMethods groupMethods,
Object[] instances,
ITestContext testContext);
}