org.testng.internal.annotations
Class TestAnnotation

java.lang.Object
  extended by org.testng.internal.annotations.BaseAnnotation
      extended by org.testng.internal.annotations.TestOrConfiguration
          extended by org.testng.internal.annotations.TestAnnotation
All Implemented Interfaces:
IAnnotation, IParameterizable, ITest, ITestOrConfiguration

public class TestAnnotation
extends TestOrConfiguration
implements ITest

An implementation of ITest Created on Dec 20, 2005

Author:
Cedric Beust

Constructor Summary
TestAnnotation()
           
 
Method Summary
 boolean getAlwaysRun()
          If set to true, this test method will always be run even if it depends on a method that failed.
 java.lang.String getDataProvider()
           
 java.lang.Class<?> getDataProviderClass()
           
 java.lang.Class<?>[] getExpectedExceptions()
           
 int getInvocationCount()
          Returns the number of times this method should be invoked.
 IRetryAnalyzer getRetryAnalyzer()
           
 boolean getSequential()
           
 int getSuccessPercentage()
          The percentage of success expected from this method.
 java.lang.String getSuiteName()
           
 java.lang.String getTestName()
           
 int getThreadPoolSize()
          The size of the thread pool for this method.
 long getTimeOut()
          Returns the maximum number of milliseconds this test should take.
 void setAlwaysRun(boolean alwaysRun)
           
 void setDataProvider(java.lang.String dataProvider)
           
 void setDataProviderClass(java.lang.Class<?> dataProviderClass)
           
 void setExpectedExceptions(java.lang.Class<?>[] expectedExceptions)
           
 void setInvocationCount(int invocationCount)
           
 void setRetryAnalyzer(java.lang.Class<?> c)
           
 void setSequential(boolean sequential)
           
 void setSkipFailedInvocations(boolean skip)
           
 void setSuccessPercentage(int successPercentage)
           
 void setSuiteName(java.lang.String xmlSuite)
           
 void setTestName(java.lang.String xmlTest)
           
 void setThreadPoolSize(int threadPoolSize)
           
 void setTimeOut(long timeOut)
           
 boolean skipFailedInvocations()
           
 
Methods inherited from class org.testng.internal.annotations.TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, getParameters, setDependsOnGroups, setDependsOnMethods, setDescription, setEnabled, setGroups, setParameters
 
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.internal.annotations.ITestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, setDependsOnGroups, setDependsOnMethods, setGroups
 
Methods inherited from interface org.testng.internal.annotations.IParameterizable
getParameters
 

Constructor Detail

TestAnnotation

public TestAnnotation()
Method Detail

getExpectedExceptions

public java.lang.Class<?>[] getExpectedExceptions()
Specified by:
getExpectedExceptions in interface ITest
Returns:
the expectedExceptions

setExpectedExceptions

public void setExpectedExceptions(java.lang.Class<?>[] expectedExceptions)
Specified by:
setExpectedExceptions in interface ITest
Parameters:
expectedExceptions - the expectedExceptions to set

setAlwaysRun

public void setAlwaysRun(boolean alwaysRun)
Specified by:
setAlwaysRun in interface ITest

setDataProvider

public void setDataProvider(java.lang.String dataProvider)

getDataProviderClass

public java.lang.Class<?> getDataProviderClass()
Specified by:
getDataProviderClass in interface ITest

setDataProviderClass

public void setDataProviderClass(java.lang.Class<?> dataProviderClass)

setInvocationCount

public void setInvocationCount(int invocationCount)
Specified by:
setInvocationCount in interface ITest

setSuccessPercentage

public void setSuccessPercentage(int successPercentage)
Specified by:
setSuccessPercentage in interface ITest

setTimeOut

public void setTimeOut(long timeOut)
Specified by:
setTimeOut in interface ITest

getTimeOut

public long getTimeOut()
Description copied from interface: ITest
Returns the maximum number of milliseconds this test should take. If it hasn't returned after this time, it will be marked as a FAIL.

Specified by:
getTimeOut in interface ITest
Returns:
the maximum number of milliseconds this test should take.

getInvocationCount

public int getInvocationCount()
Description copied from interface: ITest
Returns the number of times this method should be invoked.

Specified by:
getInvocationCount in interface ITest
Returns:
the number of times this method should be invoked.

getSuccessPercentage

public int getSuccessPercentage()
Description copied from interface: ITest
The percentage of success expected from this method.

Specified by:
getSuccessPercentage in interface ITest

getDataProvider

public java.lang.String getDataProvider()
Specified by:
getDataProvider in interface ITest

getAlwaysRun

public boolean getAlwaysRun()
Description copied from interface: ITest
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.

Specified by:
getAlwaysRun in interface ITest

getThreadPoolSize

public int getThreadPoolSize()
Description copied from interface: ITest
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

Specified by:
getThreadPoolSize in interface ITest

setThreadPoolSize

public void setThreadPoolSize(int threadPoolSize)
Specified by:
setThreadPoolSize in interface ITest

getSuiteName

public java.lang.String getSuiteName()
Specified by:
getSuiteName in interface ITest

setSuiteName

public void setSuiteName(java.lang.String xmlSuite)
Specified by:
setSuiteName in interface ITest

getTestName

public java.lang.String getTestName()
Specified by:
getTestName in interface ITest

setTestName

public void setTestName(java.lang.String xmlTest)
Specified by:
setTestName in interface ITest

getSequential

public boolean getSequential()
Specified by:
getSequential in interface ITest

setSequential

public void setSequential(boolean sequential)
Specified by:
setSequential in interface ITest

getRetryAnalyzer

public IRetryAnalyzer getRetryAnalyzer()
Specified by:
getRetryAnalyzer in interface ITest

setRetryAnalyzer

public void setRetryAnalyzer(java.lang.Class<?> c)
Specified by:
setRetryAnalyzer in interface ITest

setSkipFailedInvocations

public void setSkipFailedInvocations(boolean skip)
Specified by:
setSkipFailedInvocations in interface ITest

skipFailedInvocations

public boolean skipFailedInvocations()
Specified by:
skipFailedInvocations in interface ITest


Copyright © 2010. All Rights Reserved.