-
Notifications
You must be signed in to change notification settings - Fork 1k
/
BeforeClass.java
87 lines (77 loc) · 2.82 KB
/
BeforeClass.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package org.testng.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Target(java.lang.annotation.ElementType.METHOD)
@Documented
public @interface BeforeClass {
/**
* Whether methods on this class/method are enabled.
*
* @return the value (default true)
*/
boolean enabled() default true;
/**
* The list of groups this class/method belongs to.
*
* @return the value
*/
String[] groups() default {};
/**
* 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.
*
* @return the value
*/
String[] dependsOnGroups() default {};
/**
* The list of methods this method depends on. There is no guarantee on the order on 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.
*
* <p>If some of these methods have been overloaded, all the overloaded versions will be run.
*
* @return the value
*/
String[] dependsOnMethods() default {};
/**
* 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. <br>
* 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.
*
* @return the value (default false)
*/
boolean alwaysRun() default false;
/**
* If true, this @Configuration method will belong to groups specified in the @Test
* annotation on the class (if any).
*
* @return the value (default true)
*/
boolean inheritGroups() default true;
/**
* The description for this method. The string used will appear in the HTML report and also on
* standard output if verbose > 2.
*
* @return the value (default empty)
*/
String description() default "";
/**
* 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.
*
* @return the value (default 0)
*/
long timeOut() default 0;
/**
* The scheduling priority. Lower priorities will be scheduled first.
*
* @return the value (default 0)
*/
int priority() default 0;
}