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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
String[]
boolean
Whether this annotation is enabled.String[]
int
long
void
setDependsOnGroups
(String[] dependsOnGroups) void
setDependsOnMethods
(String[] dependsOnMethods) void
setDescription
(String description) void
setEnabled
(boolean enabled) void
void
setPriority
(int priority) void
setTimeOut
(long timeOut) Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
Field Details
-
m_groups
-
m_enabled
private boolean m_enabled -
m_dependsOnGroups
-
m_dependsOnMethods
-
m_description
-
m_priority
private int m_priority -
m_timeOut
private long m_timeOut
-
-
Constructor Details
-
TestOrConfiguration
public TestOrConfiguration()
-
-
Method Details
-
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
- Specified by:
setDependsOnGroups
in interfaceITestOrConfiguration
-
setDependsOnMethods
- Specified by:
setDependsOnMethods
in interfaceITestOrConfiguration
-
setGroups
- Specified by:
setGroups
in interfaceITestOrConfiguration
-
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
- 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
- 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
- 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.
-