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

Update unit test docs section about @WithPlugin annotation

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • core

      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.
      ----------------------------

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

              Created:
              Updated: