1 package org.testng.internal.annotations;
2 
3 import org.testng.annotations.ITestOrConfiguration;
4 
5 /**
6  * Base interface for IBeforeSuite, IAfterSuite, etc...
7  *
8  * @author cbeust
9  * @since Jun 22, 2006
10  */
11 public interface IBaseBeforeAfter extends ITestOrConfiguration {
12   /**
13    * Whether methods on this class/method are enabled.
14    */
getEnabled()15   public boolean getEnabled();
16 
17   /**
18    * The list of groups this class/method belongs to.
19    */
getGroups()20   public String[] getGroups();
21 
22   /**
23    * The list of groups this method depends on.  Every method
24    * member of one of these groups is guaranteed to have been
25    * invoked before this method.  Furthermore, if any of these
26    * methods was not a SUCCESS, this test method will not be
27    * run and will be flagged as a SKIP.
28    */
getDependsOnGroups()29   public String[] getDependsOnGroups();
30 
31   /**
32    * The list of methods this method depends on.  There is no guarantee
33    * on the order on which the methods depended upon will be run, but you
34    * are guaranteed that all these methods will be run before the test method
35    * that contains this annotation is run.  Furthermore, if any of these
36    * methods was not a SUCCESS, this test method will not be
37    * run and will be flagged as a SKIP.
38    *
39    *  If some of these methods have been overloaded, all the overloaded
40    *  versions will be run.
41    */
getDependsOnMethods()42   public String[] getDependsOnMethods();
43 
44   /**
45    *  For before methods (beforeSuite, beforeTest, beforeTestClass and
46    *  beforeTestMethod, but not beforeGroups):
47    *  If set to true, this configuration method will be run
48    *  regardless of what groups it belongs to.
49    *  <br>
50    * For after methods (afterSuite, afterClass, ...):
51    *  If set to true, this configuration method will be run
52    *  even if one or more methods invoked previously failed or
53    *  was skipped.
54    */
getAlwaysRun()55   public boolean getAlwaysRun();
56 
57   /**
58    * If true, this &#64;Configuration method will belong to groups specified in the
59    * &#64;Test annotation on the class (if any).
60    */
getInheritGroups()61   public boolean getInheritGroups();
62 
63   /**
64    * The description for this method.  The string used will appear in the
65    * HTML report and also on standard output if verbose >= 2.
66    */
getDescription()67   public String getDescription();
68 
69 }
70