@Retention(value=RUNTIME) @Target(value=METHOD) @Documented public @interface BeforeMethod
Modifier and Type | Optional Element and Description |
---|---|
boolean |
alwaysRun
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.
|
String[] |
dependsOnGroups
The list of groups this method depends on.
|
String[] |
dependsOnMethods
The list of methods this method depends on.
|
String |
description
The description for this method.
|
boolean |
enabled
Whether methods on this class/method are enabled.
|
boolean |
firstTimeOnly
If true and the @Test method about to be run has an invocationCount > 1, this BeforeMethod
will only be invoked once (before the first test invocation).
|
String[] |
groups
The list of groups this class/method belongs to.
|
boolean |
inheritGroups
If true, this @Configuration method will belong to groups specified in the @Test
annotation on the class (if any).
|
String[] |
onlyForGroups
Causes this method to be invoked only if the test method belongs to a listed group.
|
long |
timeOut
The maximum number of milliseconds this method should take.
|
public abstract boolean enabled
public abstract String[] groups
onlyForGroups()
to
select test method groups which this method will be invoked before.public abstract String[] dependsOnGroups
public abstract String[] dependsOnMethods
If some of these methods have been overloaded, all the overloaded versions will be run.
public abstract String[] onlyForGroups
public abstract boolean alwaysRun
public abstract boolean inheritGroups
public abstract String description