Package org.testng.internal.annotations
Class TestOrConfiguration
- java.lang.Object
-
- org.testng.internal.annotations.BaseAnnotation
-
- org.testng.internal.annotations.TestOrConfiguration
-
- All Implemented Interfaces:
IAnnotation
,IParameterizable
,ITestOrConfiguration
- Direct Known Subclasses:
BaseBeforeAfter
,ConfigurationAnnotation
,TestAnnotation
public class TestOrConfiguration extends BaseAnnotation implements ITestOrConfiguration
-
-
Constructor Summary
Constructors Constructor Description TestOrConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getDependsOnGroups()
java.lang.String[]
getDependsOnMethods()
java.lang.String
getDescription()
boolean
getEnabled()
Whether this annotation is enabled.java.lang.String[]
getGroups()
int
getPriority()
long
getTimeOut()
void
setDependsOnGroups(java.lang.String[] dependsOnGroups)
void
setDependsOnMethods(java.lang.String[] dependsOnMethods)
void
setDescription(java.lang.String description)
void
setEnabled(boolean enabled)
void
setGroups(java.lang.String[] groups)
void
setPriority(int priority)
void
setTimeOut(long timeOut)
-
Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
-
-
-
Method Detail
-
getGroups
public java.lang.String[] getGroups()
- Specified by:
getGroups
in interfaceITestOrConfiguration
- Returns:
- The list of groups this class/method belongs to.
-
getEnabled
public boolean getEnabled()
Description copied from interface:IParameterizable
Whether this annotation is enabled.- Specified by:
getEnabled
in interfaceIParameterizable
- Returns:
- true if enabled
-
setDependsOnGroups
public void setDependsOnGroups(java.lang.String[] dependsOnGroups)
- Specified by:
setDependsOnGroups
in interfaceITestOrConfiguration
-
setDependsOnMethods
public void setDependsOnMethods(java.lang.String[] dependsOnMethods)
- Specified by:
setDependsOnMethods
in interfaceITestOrConfiguration
-
setGroups
public void setGroups(java.lang.String[] groups)
- Specified by:
setGroups
in interfaceITestOrConfiguration
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceITestOrConfiguration
- Returns:
- The description for this method, which will be shown in the reports.
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceIParameterizable
-
getDependsOnGroups
public java.lang.String[] getDependsOnGroups()
- Specified by:
getDependsOnGroups
in interfaceITestOrConfiguration
- Returns:
- The list of groups this method depends on. Every method member of one of these groups is guaranteed to have been invoked before this method. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP.
-
getDependsOnMethods
public java.lang.String[] getDependsOnMethods()
- Specified by:
getDependsOnMethods
in interfaceITestOrConfiguration
- Returns:
- The list of methods this method depends on. There is no guarantee on the order on which
the methods depended upon will be run, but you are guaranteed that all these methods will
be run before the test method that contains this annotation is run. Furthermore, if any of
these methods was not a SUCCESS, this test method will not be run and will be flagged as a
SKIP.
If some of these methods have been overloaded, all the overloaded versions will be run.
-
setDescription
public void setDescription(java.lang.String description)
- Specified by:
setDescription
in interfaceITestOrConfiguration
-
getPriority
public int getPriority()
-
setPriority
public void setPriority(int priority)
-
setTimeOut
public void setTimeOut(long timeOut)
- Specified by:
setTimeOut
in interfaceITestOrConfiguration
-
getTimeOut
public long getTimeOut()
- Specified by:
getTimeOut
in interfaceITestOrConfiguration
- Returns:
- 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.
-
-