Generating the plug-in

Once the plug-in and class are created, they must be packaged. The plug-in must be generated to enable HCL OneTest API to pick it up (similar to generating a JAR).

About this task

To generate the plug-in, do the following steps:

Procedure

  1. Select File > Export.
  2. In the Export dialog, select Plug-in Development > Deployable plug-ins and fragments from the list of exports.
  3. Click Next to display the Deployable plug-ins and fragment dialog.
  4. In the Available Plug-ins and Fragments list, select the plug-in that you want to generate and export (for example, com.samples.functions.dateformat).
  5. Select the Directory option and enter the directory where the plug-in is to be generated (that is, enter the path to the Functions folder under the root of your HCL OneTest API project). You can also generate it in a temporary location and copy the JAR over into the project.
    Note: Eclipse generates the plug-in in a folder called "plug-ins". HCL OneTest API supports plug-ins that are located directly in the "Functions" folder or under a "plug-ins" subfolder.
  6. Click Finish.

    The plug-in is generated and placed in the folder that you specified earlier. The destination directory contains a "plug-ins" folder and a JAR file (for example, com.samples.functions. dateformat_1.0.0.jar).