• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.testng;
2 
3 import org.testng.xml.XmlTest;
4 
5 
6 
7 
8 /**
9  * This interface allows to modify the strategy used by TestRunner
10  * to find its test methods.  At the time of this writing, TestNG
11  * supports two different strategies:  TestNG (using annotations to
12  * locate these methods) and JUnit (setUp()/tearDown() and all
13  * methods that start with "test" or have a suite() method).
14  *
15  * @author Cedric Beust, May 3, 2004
16  *
17  */
18 public interface ITestMethodFinder {
19 
20   /**
21    * @return All the applicable test methods.
22    */
getTestMethods(Class<?> cls, XmlTest xmlTest)23   ITestNGMethod[] getTestMethods(Class<?> cls, XmlTest xmlTest);
24 
25   /**
26    * @return All the methods that should be invoked
27    * before a test method is invoked.
28    */
getBeforeTestMethods(Class<?> cls)29   ITestNGMethod[] getBeforeTestMethods(Class<?> cls);
30 
31   /**
32    * @return All the methods that should be invoked
33    * after a test method completes.
34    */
getAfterTestMethods(Class<?> cls)35   ITestNGMethod[] getAfterTestMethods(Class<?> cls);
36 
37   /**
38    * @return All the methods that should be invoked
39    * after the test class has been created and before
40    * any of its test methods is invoked.
41    */
getBeforeClassMethods(Class<?> cls)42   ITestNGMethod[] getBeforeClassMethods(Class<?> cls);
43 
44   /**
45    * @return All the methods that should be invoked
46    * after the test class has been created and after
47    * all its test methods have completed.
48    */
getAfterClassMethods(Class<?> cls)49   ITestNGMethod[] getAfterClassMethods(Class<?> cls);
50 
51   /**
52    * @return All the methods that should be invoked
53    * before the suite starts running.
54    */
getBeforeSuiteMethods(Class<?> cls)55   ITestNGMethod[] getBeforeSuiteMethods(Class<?> cls);
56 
57   /**
58    * @return All the methods that should be invoked
59    * after the suite has run all its tests.
60    */
getAfterSuiteMethods(Class<?> cls)61   ITestNGMethod[] getAfterSuiteMethods(Class<?> cls);
62 
getBeforeTestConfigurationMethods(Class<?> testClass)63   ITestNGMethod[] getBeforeTestConfigurationMethods(Class<?> testClass);
64 
getAfterTestConfigurationMethods(Class<?> testClass)65   ITestNGMethod[] getAfterTestConfigurationMethods(Class<?> testClass);
66 
getBeforeGroupsConfigurationMethods(Class<?> testClass)67   ITestNGMethod[] getBeforeGroupsConfigurationMethods(Class<?> testClass);
68 
getAfterGroupsConfigurationMethods(Class<?> testClass)69   ITestNGMethod[] getAfterGroupsConfigurationMethods(Class<?> testClass);
70 
71 
72 }
73