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