-
Notifications
You must be signed in to change notification settings - Fork 999
/
ITestMethodFinder.java
76 lines (59 loc) · 2.06 KB
/
ITestMethodFinder.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package org.testng;
import org.testng.xml.XmlClass;
import org.testng.xml.XmlTest;
/**
* This interface allows to modify the strategy used by TestRunner
* to find its test methods. At the time of this writing, TestNG
* supports two different strategies: TestNG (using annotations to
* locate these methods) and JUnit (setUp()/tearDown() and all
* methods that start with "test" or have a suite() method).
*
* @author Cedric Beust, May 3, 2004
*/
public interface ITestMethodFinder {
/**
* @return All the applicable test methods.
*/
default ITestNGMethod[] getTestMethods(Class<?> cls, XmlTest xmlTest) {
return null;
}
default ITestNGMethod[] getTestMethods(XmlClass xmlClass, XmlTest xmlTest) {
return null;
}
/**
* @return All the methods that should be invoked
* before a test method is invoked.
*/
ITestNGMethod[] getBeforeTestMethods(Class<?> cls);
/**
* @return All the methods that should be invoked
* after a test method completes.
*/
ITestNGMethod[] getAfterTestMethods(Class<?> cls);
/**
* @return All the methods that should be invoked
* after the test class has been created and before
* any of its test methods is invoked.
*/
ITestNGMethod[] getBeforeClassMethods(Class<?> cls);
/**
* @return All the methods that should be invoked
* after the test class has been created and after
* all its test methods have completed.
*/
ITestNGMethod[] getAfterClassMethods(Class<?> cls);
/**
* @return All the methods that should be invoked
* before the suite starts running.
*/
ITestNGMethod[] getBeforeSuiteMethods(Class<?> cls);
/**
* @return All the methods that should be invoked
* after the suite has run all its tests.
*/
ITestNGMethod[] getAfterSuiteMethods(Class<?> cls);
ITestNGMethod[] getBeforeTestConfigurationMethods(Class<?> testClass);
ITestNGMethod[] getAfterTestConfigurationMethods(Class<?> testClass);
ITestNGMethod[] getBeforeGroupsConfigurationMethods(Class<?> testClass);
ITestNGMethod[] getAfterGroupsConfigurationMethods(Class<?> testClass);
}