Package org.testng.annotations
Interface ITestAnnotation
- All Superinterfaces:
IAnnotation
,org.testng.internal.annotations.IDataProvidable
,IParameterizable
,ITestOrConfiguration
public interface ITestAnnotation
extends ITestOrConfiguration, org.testng.internal.annotations.IDataProvidable
Encapsulate the @Test / @testng.test annotation.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
If set to true, this test method will always be run even if it depends on a method that failed.Class<?>
Class<?>[]
int
Returns the number of times this method should be invoked.int
The scheduling priority.Class<? extends IRetryAnalyzer>
boolean
int
The percentage of success expected from this method.int
The size of the thread pool for this method.boolean
long
void
setAlwaysRun
(boolean f) void
setAttributes
(CustomAttribute[] attributes) void
void
setDataProviderClass
(Class<?> v) void
void
setExpectedExceptions
(Class<?>[] e) void
void
setIgnoreMissingDependencies
(boolean ignore) void
setInvocationCount
(int l) void
setInvocationTimeOut
(long timeOut) void
setPriority
(int priority) void
setRetryAnalyzer
(Class<? extends IRetryAnalyzer> c) void
setSingleThreaded
(boolean f) void
setSkipFailedInvocations
(boolean skip) void
setSuccessPercentage
(int s) void
void
void
setThreadPoolSize
(int n) boolean
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 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:
getDataProvider
in interfaceorg.testng.internal.annotations.IDataProvidable
-
setDataProvider
- Specified by:
setDataProvider
in interfaceorg.testng.internal.annotations.IDataProvidable
-
getDataProviderClass
Class<?> getDataProviderClass()- Specified by:
getDataProviderClass
in interfaceorg.testng.internal.annotations.IDataProvidable
-
setDataProviderClass
- Specified by:
setDataProviderClass
in interfaceorg.testng.internal.annotations.IDataProvidable
-
getDataProviderDynamicClass
String getDataProviderDynamicClass()- Specified by:
getDataProviderDynamicClass
in interfaceorg.testng.internal.annotations.IDataProvidable
-
setDataProviderDynamicClass
- Specified by:
setDataProviderDynamicClass
in interfaceorg.testng.internal.annotations.IDataProvidable
-
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
-