Package org.testng.internal.annotations
Class ConfigurationAnnotation
- java.lang.Object
-
- org.testng.internal.annotations.BaseAnnotation
-
- org.testng.internal.annotations.TestOrConfiguration
-
- org.testng.internal.annotations.ConfigurationAnnotation
-
- All Implemented Interfaces:
IAnnotation,IConfigurationAnnotation,IParameterizable,ITestOrConfiguration,IAfterClass,IAfterGroups,IAfterMethod,IAfterSuite,IAfterTest,IBaseBeforeAfter,IBaseBeforeAfterMethod,IBeforeClass,IBeforeGroups,IBeforeMethod,IBeforeSuite,IBeforeTest
public class ConfigurationAnnotation extends TestOrConfiguration implements IConfigurationAnnotation, IBeforeSuite, IAfterSuite, IBeforeTest, IAfterTest, IBeforeGroups, IAfterGroups, IBeforeClass, IAfterClass, IBeforeMethod, IAfterMethod
An implementation of IConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]m_afterGroupsprivate booleanm_afterSuiteprivate booleanm_afterTestprivate booleanm_afterTestClassprivate booleanm_afterTestMethodprivate booleanm_alwaysRunprivate java.lang.String[]m_beforeGroupsprivate booleanm_beforeSuiteprivate booleanm_beforeTestprivate booleanm_beforeTestClassprivate booleanm_beforeTestMethodprivate booleanm_firstTimeOnlyprivate java.lang.String[]m_groupFiltersprivate booleanm_inheritGroupsprivate booleanm_isFakeConfigurationprivate booleanm_lastTimeOnly
-
Constructor Summary
Constructors Constructor Description ConfigurationAnnotation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAfterGroups()The list of groups that this configuration method will run after.booleangetAfterSuite()If true, the annotated method will be run after all tests in this suite have run.booleangetAfterTest()If true, the annotated method will be run after all every test.booleangetAfterTestClass()If true, the annotated method will be run after all the tests in the test class have been run.booleangetAfterTestMethod()If true, the annotated method will be run after any test method is invoked.booleangetAlwaysRun()Used only for after type of configuration methods.java.lang.String[]getBeforeGroups()The list of groups that this configuration method will run before.booleangetBeforeSuite()If true, the annotated method will be run before this suite starts.booleangetBeforeTest()If true, the annotated method will be run before every testbooleangetBeforeTestClass()If true, the annotated method will be run after the test class is instantiated and before the test method is invoked.booleangetBeforeTestMethod()If true, the annotated method will be run before any test method is invoked.java.lang.String[]getGroupFilters()The list of groups the test method must belong to one of which.booleangetInheritGroups()If true, this @Configuration method will belong to groups specified in the \@Test annotation on the class (if any).booleanisFakeConfiguration()Internal use only.booleanisFirstTimeOnly()booleanisLastTimeOnly()voidsetAfterGroups(java.lang.String[] afterGroups)voidsetAfterSuite(boolean afterSuite)voidsetAfterTest(boolean afterTest)voidsetAfterTestClass(boolean afterTestClass)voidsetAfterTestMethod(boolean afterTestMethod)voidsetAlwaysRun(boolean alwaysRun)voidsetBeforeGroups(java.lang.String[] beforeGroups)voidsetBeforeSuite(boolean beforeSuite)voidsetBeforeTest(boolean beforeTest)voidsetBeforeTestClass(boolean beforeTestClass)voidsetBeforeTestMethod(boolean beforeTestMethod)voidsetFakeConfiguration(boolean b)voidsetFirstTimeOnly(boolean f)(package private) voidsetGroupFilters(java.lang.String[] groupFilters)voidsetInheritGroups(boolean inheritGroups)voidsetLastTimeOnly(boolean f)-
Methods inherited from class org.testng.internal.annotations.TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, getPriority, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, 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, getDescription, getEnabled, getGroups
-
Methods inherited from interface org.testng.annotations.IParameterizable
setEnabled
-
Methods inherited from interface org.testng.annotations.ITestOrConfiguration
getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
-
-
-
Field Detail
-
m_beforeTestClass
private boolean m_beforeTestClass
-
m_afterTestClass
private boolean m_afterTestClass
-
m_beforeTestMethod
private boolean m_beforeTestMethod
-
m_afterTestMethod
private boolean m_afterTestMethod
-
m_beforeTest
private boolean m_beforeTest
-
m_afterTest
private boolean m_afterTest
-
m_beforeSuite
private boolean m_beforeSuite
-
m_afterSuite
private boolean m_afterSuite
-
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_groupFilters
private java.lang.String[] m_groupFilters
-
m_isFakeConfiguration
private boolean m_isFakeConfiguration
-
m_firstTimeOnly
private boolean m_firstTimeOnly
-
m_lastTimeOnly
private boolean m_lastTimeOnly
-
-
Method Detail
-
setAfterSuite
public void setAfterSuite(boolean afterSuite)
-
setAfterTest
public void setAfterTest(boolean afterTest)
-
setAfterTestClass
public void setAfterTestClass(boolean afterTestClass)
-
setAfterTestMethod
public void setAfterTestMethod(boolean afterTestMethod)
-
setAlwaysRun
public void setAlwaysRun(boolean alwaysRun)
-
setBeforeSuite
public void setBeforeSuite(boolean beforeSuite)
-
setBeforeTest
public void setBeforeTest(boolean beforeTest)
-
setBeforeTestClass
public void setBeforeTestClass(boolean beforeTestClass)
-
setBeforeTestMethod
public void setBeforeTestMethod(boolean beforeTestMethod)
-
setInheritGroups
public void setInheritGroups(boolean inheritGroups)
-
getBeforeTestClass
public boolean getBeforeTestClass()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run after the test class is instantiated and before the test method is invoked.- Specified by:
getBeforeTestClassin interfaceIConfigurationAnnotation
-
getAfterTestClass
public boolean getAfterTestClass()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run after all the tests in the test class have been run.- Specified by:
getAfterTestClassin interfaceIConfigurationAnnotation
-
getBeforeTestMethod
public boolean getBeforeTestMethod()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run before any test method is invoked.- Specified by:
getBeforeTestMethodin interfaceIConfigurationAnnotation
-
getAfterTestMethod
public boolean getAfterTestMethod()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run after any test method is invoked.- Specified by:
getAfterTestMethodin interfaceIConfigurationAnnotation
-
getBeforeSuite
public boolean getBeforeSuite()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run before this suite starts.- Specified by:
getBeforeSuitein interfaceIConfigurationAnnotation
-
getAfterSuite
public boolean getAfterSuite()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run after all tests in this suite have run.- Specified by:
getAfterSuitein interfaceIConfigurationAnnotation
-
getBeforeTest
public boolean getBeforeTest()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run before every test- Specified by:
getBeforeTestin interfaceIConfigurationAnnotation
-
getAfterTest
public boolean getAfterTest()
Description copied from interface:IConfigurationAnnotationIf true, the annotated method will be run after all every test.- Specified by:
getAfterTestin interfaceIConfigurationAnnotation
-
getAlwaysRun
public boolean getAlwaysRun()
Description copied from interface:IConfigurationAnnotationUsed only for after type of configuration methods. If set to true than the configuration method will be run whatever the status of before configuration methods was.- Specified by:
getAlwaysRunin interfaceIBaseBeforeAfter- Specified by:
getAlwaysRunin interfaceIConfigurationAnnotation
-
getInheritGroups
public boolean getInheritGroups()
Description copied from interface:IConfigurationAnnotationIf true, this @Configuration method will belong to groups specified in the \@Test annotation on the class (if any).- Specified by:
getInheritGroupsin interfaceIBaseBeforeAfter- Specified by:
getInheritGroupsin interfaceIConfigurationAnnotation
-
getAfterGroups
public java.lang.String[] getAfterGroups()
Description copied from interface:IConfigurationAnnotationThe list of groups that this configuration method will run after.- Specified by:
getAfterGroupsin interfaceIConfigurationAnnotation
-
setAfterGroups
public void setAfterGroups(java.lang.String[] afterGroups)
-
getBeforeGroups
public java.lang.String[] getBeforeGroups()
Description copied from interface:IConfigurationAnnotationThe list of groups that this configuration method will run before.- Specified by:
getBeforeGroupsin interfaceIConfigurationAnnotation
-
setBeforeGroups
public void setBeforeGroups(java.lang.String[] beforeGroups)
-
getGroupFilters
public java.lang.String[] getGroupFilters()
Description copied from interface:IBaseBeforeAfterMethodThe list of groups the test method must belong to one of which.- Specified by:
getGroupFiltersin interfaceIBaseBeforeAfterMethod
-
setGroupFilters
void setGroupFilters(java.lang.String[] groupFilters)
-
setFakeConfiguration
public void setFakeConfiguration(boolean b)
-
isFakeConfiguration
public boolean isFakeConfiguration()
Description copied from interface:IConfigurationAnnotationInternal use only.- Specified by:
isFakeConfigurationin interfaceIConfigurationAnnotation- Returns:
- true if this configuration annotation is not a "true" configuration annotation but a @BeforeSuite or similar that is represented as a configuration annotation.
-
setFirstTimeOnly
public void setFirstTimeOnly(boolean f)
-
isFirstTimeOnly
public boolean isFirstTimeOnly()
-
setLastTimeOnly
public void setLastTimeOnly(boolean f)
-
isLastTimeOnly
public boolean isLastTimeOnly()
-
-