Package org.testng.internal.annotations
Class TestAnnotation
- java.lang.Object
-
- org.testng.internal.annotations.BaseAnnotation
-
- org.testng.internal.annotations.TestOrConfiguration
-
- org.testng.internal.annotations.TestAnnotation
-
- All Implemented Interfaces:
IAnnotation,IParameterizable,ITestAnnotation,ITestOrConfiguration,IDataProvidable
public class TestAnnotation extends TestOrConfiguration implements ITestAnnotation
An implementation of ITest
-
-
Constructor Summary
Constructors Constructor Description TestAnnotation()
-
Method Summary
All Methods Instance Methods Concrete 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.StringgetDataProviderDynamicClass()java.lang.Class<?>[]getExpectedExceptions()java.lang.StringgetExpectedExceptionsMessageRegExp()intgetInvocationCount()Returns the number of times this method should be invoked.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 alwaysRun)voidsetAttributes(CustomAttribute[] attributes)voidsetDataProvider(java.lang.String dataProvider)voidsetDataProviderClass(java.lang.Class<?> dataProviderClass)voidsetDataProviderDynamicClass(java.lang.String v)voidsetExpectedExceptions(java.lang.Class<?>[] expectedExceptions)voidsetExpectedExceptionsMessageRegExp(java.lang.String expectedExceptionsMessageRegExp)voidsetIgnoreMissingDependencies(boolean ignore)voidsetInvocationCount(int invocationCount)voidsetInvocationTimeOut(long timeOut)voidsetRetryAnalyzer(java.lang.Class<? extends IRetryAnalyzer> c)voidsetSingleThreaded(boolean singleThreaded)voidsetSkipFailedInvocations(boolean skip)voidsetSuccessPercentage(int successPercentage)voidsetSuiteName(java.lang.String xmlSuite)voidsetTestName(java.lang.String xmlTest)voidsetThreadPoolSize(int threadPoolSize)booleanskipFailedInvocations()-
Methods inherited from class org.testng.internal.annotations.TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, getPriority, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setEnabled, setGroups, setPriority, setTimeOut
-
Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.testng.annotations.IParameterizable
getEnabled, setEnabled
-
Methods inherited from interface org.testng.annotations.ITestAnnotation
getPriority, setPriority
-
Methods inherited from interface org.testng.annotations.ITestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getGroups, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
-
-
-
Method Detail
-
getExpectedExceptions
public java.lang.Class<?>[] getExpectedExceptions()
- Specified by:
getExpectedExceptionsin interfaceITestAnnotation- Returns:
- the expectedExceptions
-
setExpectedExceptions
public void setExpectedExceptions(java.lang.Class<?>[] expectedExceptions)
- Specified by:
setExpectedExceptionsin interfaceITestAnnotation- Parameters:
expectedExceptions- the expectedExceptions to set
-
getExpectedExceptionsMessageRegExp
public java.lang.String getExpectedExceptionsMessageRegExp()
- Specified by:
getExpectedExceptionsMessageRegExpin interfaceITestAnnotation
-
setExpectedExceptionsMessageRegExp
public void setExpectedExceptionsMessageRegExp(java.lang.String expectedExceptionsMessageRegExp)
- Specified by:
setExpectedExceptionsMessageRegExpin interfaceITestAnnotation
-
setAlwaysRun
public void setAlwaysRun(boolean alwaysRun)
- Specified by:
setAlwaysRunin interfaceITestAnnotation
-
setDataProvider
public void setDataProvider(java.lang.String dataProvider)
- Specified by:
setDataProviderin interfaceIDataProvidable- Specified by:
setDataProviderin interfaceITestAnnotation
-
getDataProviderClass
public java.lang.Class<?> getDataProviderClass()
- Specified by:
getDataProviderClassin interfaceIDataProvidable- Specified by:
getDataProviderClassin interfaceITestAnnotation
-
setDataProviderClass
public void setDataProviderClass(java.lang.Class<?> dataProviderClass)
- Specified by:
setDataProviderClassin interfaceIDataProvidable- Specified by:
setDataProviderClassin interfaceITestAnnotation
-
getDataProviderDynamicClass
public java.lang.String getDataProviderDynamicClass()
- Specified by:
getDataProviderDynamicClassin interfaceIDataProvidable- Specified by:
getDataProviderDynamicClassin interfaceITestAnnotation
-
setDataProviderDynamicClass
public void setDataProviderDynamicClass(java.lang.String v)
- Specified by:
setDataProviderDynamicClassin interfaceIDataProvidable- Specified by:
setDataProviderDynamicClassin interfaceITestAnnotation
-
setInvocationCount
public void setInvocationCount(int invocationCount)
- Specified by:
setInvocationCountin interfaceITestAnnotation
-
setSuccessPercentage
public void setSuccessPercentage(int successPercentage)
- Specified by:
setSuccessPercentagein interfaceITestAnnotation
-
getInvocationCount
public int getInvocationCount()
Description copied from interface:ITestAnnotationReturns the number of times this method should be invoked.- Specified by:
getInvocationCountin interfaceITestAnnotation- Returns:
- the number of times this method should be invoked.
-
invocationTimeOut
public long invocationTimeOut()
- Specified by:
invocationTimeOutin interfaceITestAnnotation
-
setInvocationTimeOut
public void setInvocationTimeOut(long timeOut)
- Specified by:
setInvocationTimeOutin interfaceITestAnnotation
-
getSuccessPercentage
public int getSuccessPercentage()
Description copied from interface:ITestAnnotationThe percentage of success expected from this method.- Specified by:
getSuccessPercentagein interfaceITestAnnotation- Returns:
- the value
-
getDataProvider
public java.lang.String getDataProvider()
- Specified by:
getDataProviderin interfaceIDataProvidable- Specified by:
getDataProviderin interfaceITestAnnotation
-
getAlwaysRun
public boolean getAlwaysRun()
Description copied from interface:ITestAnnotationIf 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.- Specified by:
getAlwaysRunin interfaceITestAnnotation- Returns:
- the value
-
getThreadPoolSize
public int getThreadPoolSize()
Description copied from interface:ITestAnnotationThe 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- Specified by:
getThreadPoolSizein interfaceITestAnnotation- Returns:
- the value
-
setThreadPoolSize
public void setThreadPoolSize(int threadPoolSize)
- Specified by:
setThreadPoolSizein interfaceITestAnnotation
-
getSuiteName
public java.lang.String getSuiteName()
- Specified by:
getSuiteNamein interfaceITestAnnotation
-
setSuiteName
public void setSuiteName(java.lang.String xmlSuite)
- Specified by:
setSuiteNamein interfaceITestAnnotation
-
getTestName
public java.lang.String getTestName()
- Specified by:
getTestNamein interfaceITestAnnotation
-
setTestName
public void setTestName(java.lang.String xmlTest)
- Specified by:
setTestNamein interfaceITestAnnotation
-
getSingleThreaded
public boolean getSingleThreaded()
- Specified by:
getSingleThreadedin interfaceITestAnnotation
-
setSingleThreaded
public void setSingleThreaded(boolean singleThreaded)
- Specified by:
setSingleThreadedin interfaceITestAnnotation
-
setRetryAnalyzer
public void setRetryAnalyzer(java.lang.Class<? extends IRetryAnalyzer> c)
- Specified by:
setRetryAnalyzerin interfaceITestAnnotation
-
getRetryAnalyzerClass
public java.lang.Class<? extends IRetryAnalyzer> getRetryAnalyzerClass()
- Specified by:
getRetryAnalyzerClassin interfaceITestAnnotation
-
setSkipFailedInvocations
public void setSkipFailedInvocations(boolean skip)
- Specified by:
setSkipFailedInvocationsin interfaceITestAnnotation
-
skipFailedInvocations
public boolean skipFailedInvocations()
- Specified by:
skipFailedInvocationsin interfaceITestAnnotation
-
setIgnoreMissingDependencies
public void setIgnoreMissingDependencies(boolean ignore)
- Specified by:
setIgnoreMissingDependenciesin interfaceITestAnnotation
-
ignoreMissingDependencies
public boolean ignoreMissingDependencies()
- Specified by:
ignoreMissingDependenciesin interfaceITestAnnotation
-
getAttributes
public CustomAttribute[] getAttributes()
- Specified by:
getAttributesin interfaceITestAnnotation
-
setAttributes
public void setAttributes(CustomAttribute[] attributes)
- Specified by:
setAttributesin interfaceITestAnnotation
-
-