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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]booleanbooleanbooleanbooleanbooleanUsed only for after type of configuration methods.String[]booleanbooleanbooleanbooleanString[]booleanbooleanbooleanbooleanInternal use only.booleanbooleanbooleanvoidsetAfterGroups(String[] afterGroups) voidsetAfterSuite(boolean afterSuite) voidsetAfterTest(boolean afterTest) voidsetAfterTestClass(boolean afterTestClass) voidsetAfterTestMethod(boolean afterTestMethod) voidsetAlwaysRun(boolean alwaysRun) voidsetBeforeGroups(String[] beforeGroups) voidsetBeforeSuite(boolean beforeSuite) voidsetBeforeTest(boolean beforeTest) voidsetBeforeTestClass(boolean beforeTestClass) voidsetBeforeTestMethod(boolean beforeTestMethod) voidsetFakeConfiguration(boolean b) voidsetFirstTimeOnly(boolean f) voidsetIgnoreFailure(boolean ignoreFailure) voidsetInheritGroups(boolean inheritGroups) voidsetIsAfterGroups(boolean isAfterGroups) voidsetIsBeforeGroups(boolean isBeforeGroups) voidsetLastTimeOnly(boolean f) Methods inherited from class TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, getPriority, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setEnabled, setGroups, setPriority, setTimeOutMethods inherited from class BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClassMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IBaseBeforeAfter
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, ignoreFailureMethods inherited from interface IParameterizable
setEnabledMethods inherited from interface ITestOrConfiguration
getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
Constructor Details
-
ConfigurationAnnotation
public ConfigurationAnnotation()
-
-
Method Details
-
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) -
setIsBeforeGroups
public void setIsBeforeGroups(boolean isBeforeGroups) -
setIsAfterGroups
public void setIsAfterGroups(boolean isAfterGroups) -
isBeforeGroups
public boolean isBeforeGroups()- Specified by:
isBeforeGroupsin interfaceIConfigurationAnnotation
-
isAfterGroups
public boolean isAfterGroups()- Specified by:
isAfterGroupsin interfaceIConfigurationAnnotation
-
getBeforeTestClass
public boolean getBeforeTestClass()- Specified by:
getBeforeTestClassin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after the test class is instantiated and before the test method is invoked.
-
getAfterTestClass
public boolean getAfterTestClass()- Specified by:
getAfterTestClassin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after all the tests in the test class have been run.
-
getBeforeTestMethod
public boolean getBeforeTestMethod()- Specified by:
getBeforeTestMethodin interfaceIConfigurationAnnotation- Returns:
- true true if the annotated method will be run before any test method is invoked.
-
getAfterTestMethod
public boolean getAfterTestMethod()- Specified by:
getAfterTestMethodin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after any test method is invoked.
-
getBeforeSuite
public boolean getBeforeSuite()- Specified by:
getBeforeSuitein interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run before this suite starts.
-
getAfterSuite
public boolean getAfterSuite()- Specified by:
getAfterSuitein interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after all tests in this suite have run.
-
getBeforeTest
public boolean getBeforeTest()- Specified by:
getBeforeTestin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run before every test
-
getAfterTest
public boolean getAfterTest()- Specified by:
getAfterTestin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after all every test.
-
getAlwaysRun
public boolean getAlwaysRun()Description copied from interface:IConfigurationAnnotationUsed only for after type of configuration methods.- Specified by:
getAlwaysRunin interfaceIBaseBeforeAfter- Specified by:
getAlwaysRunin interfaceIConfigurationAnnotation- Returns:
- true if the configuration method will be run whatever the status of before configuration methods was.
-
getInheritGroups
public boolean getInheritGroups()- Specified by:
getInheritGroupsin interfaceIBaseBeforeAfter- Specified by:
getInheritGroupsin interfaceIConfigurationAnnotation- Returns:
- true if this @Configuration method will belong to groups specified in the \@Test annotation on the class (if any).
-
getAfterGroups
- Specified by:
getAfterGroupsin interfaceIConfigurationAnnotation- Returns:
- The list of groups that this configuration method will run after.
-
setAfterGroups
-
getBeforeGroups
- Specified by:
getBeforeGroupsin interfaceIConfigurationAnnotation- Returns:
- The list of groups that this configuration method will run before.
-
setBeforeGroups
-
getGroupFilters
- Specified by:
getGroupFiltersin interfaceIBaseBeforeAfterMethod- Returns:
- The list of groups the test method must belong to one of which.
-
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() -
isIgnoreFailure
public boolean isIgnoreFailure()- Specified by:
isIgnoreFailurein interfaceIConfigurationAnnotation
-
setIgnoreFailure
public void setIgnoreFailure(boolean ignoreFailure)
-