Annotation Interface RuleAnnotation
Meta-annotation for annotations that introduces a
TestRule
for test.
This allows annotations on test class/method to add additional setup/shutdown behaviours.
- Author:
- Kohsuke Kawaguchi
-
Required Element Summary
-
Optional Element Summary
-
Element Details
-
value
Class<? extends org.junit.rules.TestRule> valueThe rule class that defines the setup/shutdown behaviour.The instance is obtained through Guice.
-
-
-
priority
int priorityOptional ordering among rules.Annotation with
priority >= 0
are guaranteed to be run after Jenkins is up. Negative priorities are run before startup on best effort basis. (It might not happen before for ExistingJenkinsController, PooledJenkinsController and possibly others).Annotations that skips execution are encouraged to run before Jenkins is booted up to save time. Note, that these implementations can not inject Jenkins for obvious reasons.
- Default:
- 0
-