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
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
m_dependsOnGroups
private java.lang.String[]
m_dependsOnMethods
private java.lang.String
m_description
private boolean
m_enabled
private java.lang.String[]
m_groups
private java.lang.String[]
m_parameters
private int
m_priority
private long
m_timeOut
-
Constructor Summary
Constructors Constructor Description TestOrConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getDependsOnGroups()
The list of groups this method depends on.java.lang.String[]
getDependsOnMethods()
The list of methods this method depends on.java.lang.String
getDescription()
The description for this method, which will be shown in the reports.boolean
getEnabled()
Whether this annotation is enabled.java.lang.String[]
getGroups()
The list of groups this class/method belongs to.java.lang.String[]
getParameters()
The list of variables used to fill the parameters of this method.int
getPriority()
long
getTimeOut()
Returns the maximum number of milliseconds this test should take.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
setParameters(java.lang.String[] parameters)
void
setPriority(int priority)
void
setTimeOut(long timeOut)
-
Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
-
-
-
Field Detail
-
m_parameters
private java.lang.String[] m_parameters
-
m_groups
private java.lang.String[] m_groups
-
m_enabled
private boolean m_enabled
-
m_dependsOnGroups
private java.lang.String[] m_dependsOnGroups
-
m_dependsOnMethods
private java.lang.String[] m_dependsOnMethods
-
m_description
private java.lang.String m_description
-
m_priority
private int m_priority
-
m_timeOut
private long m_timeOut
-
-
Method Detail
-
getGroups
public java.lang.String[] getGroups()
Description copied from interface:ITestOrConfiguration
The list of groups this class/method belongs to.- Specified by:
getGroups
in interfaceITestOrConfiguration
-
getEnabled
public boolean getEnabled()
Description copied from interface:IParameterizable
Whether this annotation is enabled.- Specified by:
getEnabled
in interfaceIParameterizable
-
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()
Description copied from interface:ITestOrConfiguration
The description for this method, which will be shown in the reports.- Specified by:
getDescription
in interfaceITestOrConfiguration
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceIParameterizable
-
getDependsOnGroups
public java.lang.String[] getDependsOnGroups()
Description copied from interface:ITestOrConfiguration
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.- Specified by:
getDependsOnGroups
in interfaceITestOrConfiguration
-
getDependsOnMethods
public java.lang.String[] getDependsOnMethods()
Description copied from interface:ITestOrConfiguration
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.- Specified by:
getDependsOnMethods
in interfaceITestOrConfiguration
-
getParameters
public java.lang.String[] getParameters()
Description copied from interface:IParameterizable
The list of variables used to fill the parameters of this method. These variables must be defined in the property file.- Specified by:
getParameters
in interfaceIParameterizable
-
setParameters
public void setParameters(java.lang.String[] parameters)
-
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()
Description copied from interface:ITestOrConfiguration
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 interfaceITestOrConfiguration
- Returns:
- the maximum number of milliseconds this test should take.
-
-