Interface ITestAnnotation
- All Superinterfaces:
IAnnotation, IDataProvidable, IParameterizable, ITestOrConfiguration
- All Known Subinterfaces:
ITest
- All Known Implementing Classes:
TestAnnotation
Encapsulate the @Test / @testng.test annotation.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIf set to true, this test method will always be run even if it depends on a method that failed.Class<?> Class<?>[]intReturns the number of times this method should be invoked.intThe scheduling priority.Class<? extends IRetryAnalyzer> booleanintThe percentage of success expected from this method.intThe size of the thread pool for this method.booleanlongvoidsetAlwaysRun(boolean f) voidsetAttributes(CustomAttribute[] attributes) voidvoidsetDataProviderClass(Class<?> v) voidvoidsetExpectedExceptions(Class<?>[] e) voidvoidsetIgnoreMissingDependencies(boolean ignore) voidsetInvocationCount(int l) voidsetInvocationTimeOut(long timeOut) voidsetPriority(int priority) voidsetRetryAnalyzer(Class<? extends IRetryAnalyzer> c) voidsetSingleThreaded(boolean f) voidsetSkipFailedInvocations(boolean skip) voidsetSuccessPercentage(int s) voidvoidvoidsetThreadPoolSize(int n) booleanMethods inherited from interface IParameterizable
getEnabled, setEnabledMethods inherited from interface ITestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getGroups, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
Method Details
-
getInvocationCount
int getInvocationCount()Returns the number of times this method should be invoked.- Returns:
- the number of times this method should be invoked.
-
setInvocationCount
void setInvocationCount(int l) -
getThreadPoolSize
int getThreadPoolSize()The size of the thread pool for this method. The method will be invoked from multiple threads as specified by invocationCount. Note: this attribute is ignored if invocationCount is not specified- Returns:
- the value
-
setThreadPoolSize
void setThreadPoolSize(int n) -
getSuccessPercentage
int getSuccessPercentage()The percentage of success expected from this method.- Returns:
- the value
-
setSuccessPercentage
void setSuccessPercentage(int s) -
getAlwaysRun
boolean getAlwaysRun()If set to true, this test method will always be run even if it depends on a method that failed. This attribute will be ignored if this test doesn't depend on any method or group.- Returns:
- the value
-
setAlwaysRun
void setAlwaysRun(boolean f) -
getExpectedExceptions
Class<?>[] getExpectedExceptions() -
setExpectedExceptions
-
getExpectedExceptionsMessageRegExp
String getExpectedExceptionsMessageRegExp() -
setExpectedExceptionsMessageRegExp
-
getSuiteName
String getSuiteName() -
setSuiteName
-
getTestName
String getTestName() -
setTestName
-
getSingleThreaded
boolean getSingleThreaded() -
setSingleThreaded
void setSingleThreaded(boolean f) -
getDataProvider
String getDataProvider()- Specified by:
getDataProviderin interfaceIDataProvidable
-
setDataProvider
- Specified by:
setDataProviderin interfaceIDataProvidable
-
getDataProviderClass
Class<?> getDataProviderClass()- Specified by:
getDataProviderClassin interfaceIDataProvidable
-
setDataProviderClass
- Specified by:
setDataProviderClassin interfaceIDataProvidable
-
getDataProviderDynamicClass
String getDataProviderDynamicClass()- Specified by:
getDataProviderDynamicClassin interfaceIDataProvidable
-
setDataProviderDynamicClass
- Specified by:
setDataProviderDynamicClassin interfaceIDataProvidable
-
setRetryAnalyzer
-
getRetryAnalyzerClass
Class<? extends IRetryAnalyzer> getRetryAnalyzerClass() -
skipFailedInvocations
boolean skipFailedInvocations() -
setSkipFailedInvocations
void setSkipFailedInvocations(boolean skip) -
invocationTimeOut
long invocationTimeOut() -
setInvocationTimeOut
void setInvocationTimeOut(long timeOut) -
ignoreMissingDependencies
boolean ignoreMissingDependencies() -
setIgnoreMissingDependencies
void setIgnoreMissingDependencies(boolean ignore) -
getPriority
int getPriority()The scheduling priority. Lower priorities get scheduled first.- Returns:
- the value
-
setPriority
void setPriority(int priority) -
getAttributes
CustomAttribute[] getAttributes() -
setAttributes
-