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 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

      void setExpectedExceptions(Class<?>[] e)
    • getExpectedExceptionsMessageRegExp

      String getExpectedExceptionsMessageRegExp()
    • setExpectedExceptionsMessageRegExp

      void setExpectedExceptionsMessageRegExp(String e)
    • getSuiteName

      String getSuiteName()
    • setSuiteName

      void setSuiteName(String s)
    • getTestName

      String getTestName()
    • setTestName

      void setTestName(String s)
    • getSingleThreaded

      boolean getSingleThreaded()
    • setSingleThreaded

      void setSingleThreaded(boolean f)
    • getDataProvider

      String getDataProvider()
      Specified by:
      getDataProvider in interface org.testng.internal.annotations.IDataProvidable
    • setDataProvider

      void setDataProvider(String v)
      Specified by:
      setDataProvider in interface org.testng.internal.annotations.IDataProvidable
    • getDataProviderClass

      Class<?> getDataProviderClass()
      Specified by:
      getDataProviderClass in interface org.testng.internal.annotations.IDataProvidable
    • setDataProviderClass

      void setDataProviderClass(Class<?> v)
      Specified by:
      setDataProviderClass in interface org.testng.internal.annotations.IDataProvidable
    • getDataProviderDynamicClass

      String getDataProviderDynamicClass()
      Specified by:
      getDataProviderDynamicClass in interface org.testng.internal.annotations.IDataProvidable
    • setDataProviderDynamicClass

      void setDataProviderDynamicClass(String v)
      Specified by:
      setDataProviderDynamicClass in interface org.testng.internal.annotations.IDataProvidable
    • setRetryAnalyzer

      void setRetryAnalyzer(Class<? extends IRetryAnalyzer> c)
    • 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

      void setAttributes(CustomAttribute[] attributes)