Package org.testng.internal.annotations
Class BaseBeforeAfter
- java.lang.Object
-
- org.testng.internal.annotations.BaseAnnotation
-
- org.testng.internal.annotations.TestOrConfiguration
-
- org.testng.internal.annotations.BaseBeforeAfter
-
- All Implemented Interfaces:
IAnnotation
,IParameterizable
,ITestOrConfiguration
,IBaseBeforeAfter
public class BaseBeforeAfter extends TestOrConfiguration implements IBaseBeforeAfter
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
m_afterGroups
private boolean
m_alwaysRun
private java.lang.String[]
m_beforeGroups
private java.lang.String
m_description
private boolean
m_inheritGroups
-
Constructor Summary
Constructors Constructor Description BaseBeforeAfter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getAfterGroups()
boolean
getAlwaysRun()
For before methods (beforeSuite, beforeTest, beforeTestClass and beforeTestMethod, but not beforeGroups): If set to true, this configuration method will be run regardless of what groups it belongs to.java.lang.String[]
getBeforeGroups()
java.lang.String
getDescription()
The description for this method.boolean
getInheritGroups()
void
setAfterGroups(java.lang.String[] afterGroups)
void
setAlwaysRun(boolean alwaysRun)
void
setBeforeGroups(java.lang.String[] beforeGroups)
void
setDescription(java.lang.String description)
void
setInheritGroups(boolean inheritGroups)
-
Methods inherited from class org.testng.internal.annotations.TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getEnabled, getGroups, getPriority, getTimeOut, setDependsOnGroups, setDependsOnMethods, setEnabled, setGroups, setPriority, setTimeOut
-
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.IBaseBeforeAfter
getDependsOnGroups, getDependsOnMethods, getEnabled, getGroups
-
Methods inherited from interface org.testng.annotations.IParameterizable
setEnabled
-
Methods inherited from interface org.testng.annotations.ITestOrConfiguration
getTimeOut, setDependsOnGroups, setDependsOnMethods, setGroups, setTimeOut
-
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IBaseBeforeAfter
The description for this method. The string used will appear in the HTML report and also on standard output if verbose > 2.- Specified by:
getDescription
in interfaceIBaseBeforeAfter
- Specified by:
getDescription
in interfaceITestOrConfiguration
- Overrides:
getDescription
in classTestOrConfiguration
- Returns:
- the description
-
setDescription
public void setDescription(java.lang.String description)
- Specified by:
setDescription
in interfaceITestOrConfiguration
- Overrides:
setDescription
in classTestOrConfiguration
- Parameters:
description
- the description to set
-
setAlwaysRun
public void setAlwaysRun(boolean alwaysRun)
-
setInheritGroups
public void setInheritGroups(boolean inheritGroups)
-
getAlwaysRun
public boolean getAlwaysRun()
Description copied from interface:IBaseBeforeAfter
For before methods (beforeSuite, beforeTest, beforeTestClass and beforeTestMethod, but not beforeGroups): If set to true, this configuration method will be run regardless of what groups it belongs to.
For after methods (afterSuite, afterClass, ...): If set to true, this configuration method will be run even if one or more methods invoked previously failed or was skipped.- Specified by:
getAlwaysRun
in interfaceIBaseBeforeAfter
-
getInheritGroups
public boolean getInheritGroups()
- Specified by:
getInheritGroups
in interfaceIBaseBeforeAfter
- Returns:
- true if this @Configuration method will belong to groups specified in the @Test annotation on the class (if any).
-
getAfterGroups
public java.lang.String[] getAfterGroups()
-
setAfterGroups
public void setAfterGroups(java.lang.String[] afterGroups)
-
getBeforeGroups
public java.lang.String[] getBeforeGroups()
-
setBeforeGroups
public void setBeforeGroups(java.lang.String[] beforeGroups)
-
-