Annotation Interface WithPlugin


Installs the specified plugins before launching Jenkins.
Author:
Kohsuke Kawaguchi
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Filenames of the plugins to install.
  • Element Details

    • value

      String[] value
      Filenames of the plugins to install. These are expected to be of the form workflow-job.jpi where /plugins/workflow-job.jpi is a test classpath resource. (The basename should be a plugin short name and the extension should be jpi.)

      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 binding dependency:copy to the process-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 all JenkinsRule 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.