Home | History | Annotate | Download | only in annotations
      1 package org.testng.annotations;
      2 
      3 import org.testng.IRetryAnalyzer;
      4 import org.testng.internal.annotations.IDataProvidable;
      5 
      6 /**
      7  * Encapsulate the @Test / @testng.test annotation.
      8  *
      9  * Created on Dec 20, 2005
     10  * @author <a href = "mailto:cedric&#64;beust.com">Cedric Beust</a>
     11  */
     12 public interface ITestAnnotation extends ITestOrConfiguration, IDataProvidable {
     13   /**
     14    * Returns the number of times this method should be invoked.
     15    * @return the number of times this method should be invoked.
     16    */
     17   public int getInvocationCount();
     18   public void setInvocationCount(int l);
     19 
     20   /**
     21    * The size of the thread pool for this method.  The method will be invoked
     22    * from multiple threads as specified by invocationCount.
     23    * Note:  this attribute is ignored if invocationCount is not specified
     24    */
     25   public int getThreadPoolSize();
     26   public void setThreadPoolSize(int n);
     27 
     28   /**
     29    * The percentage of success expected from this method.
     30    */
     31   public int getSuccessPercentage();
     32   public void setSuccessPercentage(int s);
     33 
     34   /**
     35    * If set to true, this test method will always be run even if it depends
     36    * on a method that failed.  This attribute will be ignored if this test
     37    * doesn't depend on any method or group.
     38    */
     39   public boolean getAlwaysRun();
     40   public void setAlwaysRun(boolean f);
     41 
     42   public Class<?>[] getExpectedExceptions();
     43   public void setExpectedExceptions(Class<?>[] e);
     44 
     45   public String getExpectedExceptionsMessageRegExp();
     46   public void setExpectedExceptionsMessageRegExp(String e);
     47 
     48   public String getSuiteName();
     49   public void setSuiteName(String s);
     50 
     51   public String getTestName();
     52   public void setTestName(String s);
     53 
     54   public boolean getSequential();
     55   public void setSequential(boolean f);
     56 
     57   public boolean getSingleThreaded();
     58   public void setSingleThreaded(boolean f);
     59 
     60   public String getDataProvider();
     61   public void setDataProvider(String v);
     62 
     63   public Class<?> getDataProviderClass();
     64   public void setDataProviderClass(Class<?> v);
     65 
     66   public IRetryAnalyzer getRetryAnalyzer();
     67   public void setRetryAnalyzer(Class<?> c);
     68 
     69   public boolean skipFailedInvocations();
     70   public void setSkipFailedInvocations(boolean skip);
     71 
     72   public long invocationTimeOut();
     73   public void setInvocationTimeOut(long timeOut);
     74 
     75   public boolean ignoreMissingDependencies();
     76   public void setIgnoreMissingDependencies(boolean ignore);
     77 
     78   /**
     79    * The scheduling priority. Lower priorities get scheduled first.
     80    */
     81   public int getPriority();
     82   public void setPriority(int priority);
     83 }
     84