Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29181

Update unit test docs section about @WithPlugin annotation

    Details

    • Similar Issues:

      Description

      Unit test documentation at https://wiki.jenkins-ci.org/display/JENKINS/Unit+Test says:

      ----------------------------
      @WithPlugin(NameOfPlugin)
      Installs the specified plugin before launching Jenkins in the test. For now, this has to be one of the plugins statically available in resources "/plugins/NAME".
      ----------------------------

      It's not clear where the plugin has to be put, what should be the plugin file naming convention, and what should be put into NameOfPlugin parameter.

      I suggest the following instead:

      ----------------------------
      @WithPlugin(NameOfPluginFile)
      Installs the specified plugin before launching Jenkins in the test. For now, this has to be one of the plugins statically available in resources "/plugins/NameOfPluginFile". Plugin should be packed as JPI or HPI.

      Example: to install the plugin "my-plugin" before test, put my-plugin.hpi into plugins resource folder (e.g., src/test/plugins/my-plugin.hpi) and add annotation @WithPlugin("my-plugin.hpi") to your test.
      ----------------------------

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              kshepitko Kirill Shepitko
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: