Package org.jvnet.hudson.test.recipes
Annotation Interface WithPlugin
@Documented
@Recipe(RunnerImpl.class)
@JenkinsRecipe(RuleRunnerImpl.class)
@Target(METHOD)
@Retention(RUNTIME)
public @interface WithPlugin
Installs the specified plugins before launching Jenkins.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Required Element Summary
-
Element Details
-
value
String[] valueFilenames of the plugins to install. These are expected to be of the formworkflow-job.jpi
where/plugins/workflow-job.jpi
is a test classpath resource. (The basename should be a plugin short name and the extension should bejpi
.)Committing that file to SCM (say,
src/test/resources/plugins/sample.jpi
) is reasonable for small fake plugins built for this purpose and exercising some bit of code. If you wish to test with larger archives of real plugins, this is possible for example by bindingdependency:copy
to theprocess-test-resources
phase.In most cases you do not need this annotation. Simply add whatever plugins you are interested in testing against to your POM in
test
scope. These, and their transitive dependencies, will be loaded in allJenkinsRule
tests in this plugin. This annotation is useful if only a particular test may load the tested plugin, or if the tested plugin is not available in a repository for use as a test dependency.
-