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
- Direct Known Subclasses:
AfterSuiteAnnotation,BeforeSuiteAnnotation
public class BaseBeforeAfter extends TestOrConfiguration implements IBaseBeforeAfter
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]m_afterGroupsprivate booleanm_alwaysRunprivate java.lang.String[]m_beforeGroupsprivate java.lang.Stringm_descriptionprivate booleanm_inheritGroupsprivate java.lang.String[]m_parameters
-
Constructor Summary
Constructors Constructor Description BaseBeforeAfter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAfterGroups()booleangetAlwaysRun()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.StringgetDescription()The description for this method, which will be shown in the reports.booleangetInheritGroups()If true, this @Configuration method will belong to groups specified in the @Test annotation on the class (if any).java.lang.String[]getParameters()The list of variables used to fill the parameters of this method.voidsetAfterGroups(java.lang.String[] afterGroups)voidsetAlwaysRun(boolean alwaysRun)voidsetBeforeGroups(java.lang.String[] beforeGroups)voidsetDescription(java.lang.String description)voidsetInheritGroups(boolean inheritGroups)voidsetParameters(java.lang.String[] parameters)-
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
-
-
-
-
Field Detail
-
m_parameters
private java.lang.String[] m_parameters
-
m_alwaysRun
private boolean m_alwaysRun
-
m_inheritGroups
private boolean m_inheritGroups
-
m_beforeGroups
private java.lang.String[] m_beforeGroups
-
m_afterGroups
private java.lang.String[] m_afterGroups
-
m_description
private java.lang.String m_description
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ITestOrConfigurationThe description for this method, which will be shown in the reports.- Specified by:
getDescriptionin interfaceIBaseBeforeAfter- Specified by:
getDescriptionin interfaceITestOrConfiguration- Overrides:
getDescriptionin classTestOrConfiguration- Returns:
- the description
-
setDescription
public void setDescription(java.lang.String description)
- Specified by:
setDescriptionin interfaceITestOrConfiguration- Overrides:
setDescriptionin classTestOrConfiguration- Parameters:
description- the description to set
-
setAlwaysRun
public void setAlwaysRun(boolean alwaysRun)
-
setInheritGroups
public void setInheritGroups(boolean inheritGroups)
-
setParameters
public void setParameters(java.lang.String[] parameters)
- Overrides:
setParametersin classTestOrConfiguration
-
getParameters
public java.lang.String[] getParameters()
Description copied from interface:IParameterizableThe list of variables used to fill the parameters of this method. These variables must be defined in the property file.- Specified by:
getParametersin interfaceIParameterizable- Overrides:
getParametersin classTestOrConfiguration
-
getAlwaysRun
public boolean getAlwaysRun()
Description copied from interface:IBaseBeforeAfterFor 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:
getAlwaysRunin interfaceIBaseBeforeAfter
-
getInheritGroups
public boolean getInheritGroups()
Description copied from interface:IBaseBeforeAfterIf true, this @Configuration method will belong to groups specified in the @Test annotation on the class (if any).- Specified by:
getInheritGroupsin interfaceIBaseBeforeAfter
-
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)
-
-