| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: the value (default false)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. |
| public String[] | |
| public String[] | |
| public String | |
| public boolean | |
| public String[] | |
| public boolean | Returns: the value (default true)If true, this @Configuration method will belong to groups specified in the @Test annotation on the class (if any). |
| public boolean | Returns: the value (default false)If true and the @Test method that was just run has an invocationCount > 1, this AfterMethod will only be invoked once (after the last test invocation). |
| public String[] | Returns: the valueCauses this method to be invoked only if the test method belongs to a listed group. |
| public long |
| alwaysRun | back to summary |
|---|---|
| public 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.
| |
| dependsOnGroups | back to summary |
|---|---|
| public String[] dependsOnGroups() The list of groups this method depends on. Every method member of one of these groups is guaranteed to have been invoked before this method. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP.
| |
| dependsOnMethods | back to summary |
|---|---|
| public String[] dependsOnMethods() The list of methods this method depends on. There is no guarantee of the order in which the methods depended upon will be run, but you are guaranteed that all these methods will be run before the test method that contains this annotation is run. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP. If some of these methods have been overloaded, all the overloaded versions will be run.
| |
| description | back to summary |
|---|---|
| public String description() The description for this method. The string used will appear in the HTML report and also on standard output if verbose > 2.
| |
| enabled | back to summary |
|---|---|
| public boolean enabled() Whether methods on this class/method are enabled.
| |
| groups | back to summary |
|---|---|
| public String[] groups() The list of groups this class/method belongs to. Note that even if the test method that was
invoked belongs to a different group, all @AfterMethod methods will be invoked after it as long
as they belong to groups that were selected to run at all. See
| |
| inheritGroups | back to summary |
|---|---|
| public boolean inheritGroups() If true, this @Configuration method will belong to groups specified in the @Test annotation on the class (if any).
| |
| lastTimeOnly | back to summary |
|---|---|
| public boolean lastTimeOnly() If true and the @Test method that was just run has an invocationCount > 1, this AfterMethod will only be invoked once (after the last test invocation).
| |
| onlyForGroups | back to summary |
|---|---|
| public String[] onlyForGroups() Causes this method to be invoked only if the test method belongs to a listed group. It can be used if different cleanups are needed for different groups. Omitting this or setting it to an empty list will cause this method to run after every test method, regardless of which group it belongs to. Otherwise, this method is only invoked if the test method that was invoked belongs to one of the groups listed here.
| |
| timeOut | back to summary |
|---|---|
| public long timeOut() The maximum number of milliseconds this method should take. If it hasn't returned after this time, this method will fail and it will cause test methods depending on it to be skipped.
| |