Package org.testng.annotations
Interface ITestAnnotation
-
- All Superinterfaces:
IAnnotation,IDataProvidable,IParameterizable,ITestOrConfiguration
- All Known Subinterfaces:
ITest
- All Known Implementing Classes:
TestAnnotation
public interface ITestAnnotation extends ITestOrConfiguration, IDataProvidable
Encapsulate the @Test / @testng.test annotation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleangetAlwaysRun()If set to true, this test method will always be run even if it depends on a method that failed.CustomAttribute[]getAttributes()java.lang.StringgetDataProvider()java.lang.Class<?>getDataProviderClass()java.lang.Class<?>[]getExpectedExceptions()java.lang.StringgetExpectedExceptionsMessageRegExp()intgetInvocationCount()Returns the number of times this method should be invoked.intgetPriority()The scheduling priority.IRetryAnalyzergetRetryAnalyzer()Deprecated.- This method stands deprecated as of TestNG 7.0.0.default java.lang.Class<? extends IRetryAnalyzer>getRetryAnalyzerClass()booleangetSingleThreaded()intgetSuccessPercentage()The percentage of success expected from this method.java.lang.StringgetSuiteName()java.lang.StringgetTestName()intgetThreadPoolSize()The size of the thread pool for this method.booleanignoreMissingDependencies()longinvocationTimeOut()voidsetAlwaysRun(boolean f)voidsetAttributes(CustomAttribute[] attributes)voidsetDataProvider(java.lang.String v)voidsetDataProviderClass(java.lang.Class<?> v)voidsetExpectedExceptions(java.lang.Class<?>[] e)voidsetExpectedExceptionsMessageRegExp(java.lang.String e)voidsetIgnoreMissingDependencies(boolean ignore)voidsetInvocationCount(int l)voidsetInvocationTimeOut(long timeOut)voidsetPriority(int priority)voidsetRetryAnalyzer(java.lang.Class<? extends IRetryAnalyzer> c)voidsetSingleThreaded(boolean f)voidsetSkipFailedInvocations(boolean skip)voidsetSuccessPercentage(int s)voidsetSuiteName(java.lang.String s)voidsetTestName(java.lang.String s)voidsetThreadPoolSize(int n)booleanskipFailedInvocations()-
Methods inherited from interface org.testng.annotations.IParameterizable
getEnabled, setEnabled
-
Methods inherited from interface org.testng.annotations.ITestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getGroups, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
-
-
-
Method Detail
-
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
java.lang.Class<?>[] getExpectedExceptions()
-
setExpectedExceptions
void setExpectedExceptions(java.lang.Class<?>[] e)
-
getExpectedExceptionsMessageRegExp
java.lang.String getExpectedExceptionsMessageRegExp()
-
setExpectedExceptionsMessageRegExp
void setExpectedExceptionsMessageRegExp(java.lang.String e)
-
getSuiteName
java.lang.String getSuiteName()
-
setSuiteName
void setSuiteName(java.lang.String s)
-
getTestName
java.lang.String getTestName()
-
setTestName
void setTestName(java.lang.String s)
-
getSingleThreaded
boolean getSingleThreaded()
-
setSingleThreaded
void setSingleThreaded(boolean f)
-
getDataProvider
java.lang.String getDataProvider()
- Specified by:
getDataProviderin interfaceIDataProvidable
-
setDataProvider
void setDataProvider(java.lang.String v)
- Specified by:
setDataProviderin interfaceIDataProvidable
-
getDataProviderClass
java.lang.Class<?> getDataProviderClass()
- Specified by:
getDataProviderClassin interfaceIDataProvidable
-
setDataProviderClass
void setDataProviderClass(java.lang.Class<?> v)
- Specified by:
setDataProviderClassin interfaceIDataProvidable
-
getRetryAnalyzer
@Deprecated IRetryAnalyzer getRetryAnalyzer()
Deprecated.- This method stands deprecated as of TestNG 7.0.0. Please use {getRetryAnalyzerClass()} instead.- Returns:
- The retry analyzer
-
setRetryAnalyzer
void setRetryAnalyzer(java.lang.Class<? extends IRetryAnalyzer> c)
-
getRetryAnalyzerClass
default java.lang.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
void setAttributes(CustomAttribute[] attributes)
-
-