Home | History | Annotate | Download | only in testng
      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    */
     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    */
     29   ITestNGMethod[] getBeforeTestMethods(Class<?> cls);
     30 
     31   /**
     32    * @return All the methods that should be invoked
     33    * after a test method completes.
     34    */
     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    */
     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    */
     49   ITestNGMethod[] getAfterClassMethods(Class<?> cls);
     50 
     51   /**
     52    * @return All the methods that should be invoked
     53    * before the suite starts running.
     54    */
     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    */
     61   ITestNGMethod[] getAfterSuiteMethods(Class<?> cls);
     62 
     63   ITestNGMethod[] getBeforeTestConfigurationMethods(Class<?> testClass);
     64 
     65   ITestNGMethod[] getAfterTestConfigurationMethods(Class<?> testClass);
     66 
     67   ITestNGMethod[] getBeforeGroupsConfigurationMethods(Class<?> testClass);
     68 
     69   ITestNGMethod[] getAfterGroupsConfigurationMethods(Class<?> testClass);
     70 
     71 
     72 }
     73