• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    */
getInvocationCount()17   public int getInvocationCount();
setInvocationCount(int l)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    */
getThreadPoolSize()25   public int getThreadPoolSize();
setThreadPoolSize(int n)26   public void setThreadPoolSize(int n);
27 
28   /**
29    * The percentage of success expected from this method.
30    */
getSuccessPercentage()31   public int getSuccessPercentage();
setSuccessPercentage(int s)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    */
getAlwaysRun()39   public boolean getAlwaysRun();
setAlwaysRun(boolean f)40   public void setAlwaysRun(boolean f);
41 
getExpectedExceptions()42   public Class<?>[] getExpectedExceptions();
setExpectedExceptions(Class<?>[] e)43   public void setExpectedExceptions(Class<?>[] e);
44 
getExpectedExceptionsMessageRegExp()45   public String getExpectedExceptionsMessageRegExp();
setExpectedExceptionsMessageRegExp(String e)46   public void setExpectedExceptionsMessageRegExp(String e);
47 
getSuiteName()48   public String getSuiteName();
setSuiteName(String s)49   public void setSuiteName(String s);
50 
getTestName()51   public String getTestName();
setTestName(String s)52   public void setTestName(String s);
53 
getSequential()54   public boolean getSequential();
setSequential(boolean f)55   public void setSequential(boolean f);
56 
getSingleThreaded()57   public boolean getSingleThreaded();
setSingleThreaded(boolean f)58   public void setSingleThreaded(boolean f);
59 
getDataProvider()60   public String getDataProvider();
setDataProvider(String v)61   public void setDataProvider(String v);
62 
getDataProviderClass()63   public Class<?> getDataProviderClass();
setDataProviderClass(Class<?> v)64   public void setDataProviderClass(Class<?> v);
65 
getRetryAnalyzer()66   public IRetryAnalyzer getRetryAnalyzer();
setRetryAnalyzer(Class<?> c)67   public void setRetryAnalyzer(Class<?> c);
68 
skipFailedInvocations()69   public boolean skipFailedInvocations();
setSkipFailedInvocations(boolean skip)70   public void setSkipFailedInvocations(boolean skip);
71 
invocationTimeOut()72   public long invocationTimeOut();
setInvocationTimeOut(long timeOut)73   public void setInvocationTimeOut(long timeOut);
74 
ignoreMissingDependencies()75   public boolean ignoreMissingDependencies();
setIgnoreMissingDependencies(boolean ignore)76   public void setIgnoreMissingDependencies(boolean ignore);
77 
78   /**
79    * The scheduling priority. Lower priorities get scheduled first.
80    */
getPriority()81   public int getPriority();
setPriority(int priority)82   public void setPriority(int priority);
83 }
84