Converting existing function classes with Eclipse

If you have an existing function that is written for HCL OneTest API V4, you can use Eclipse to convert the function for use with V5 or later.

About this task

Note: It is unlikely that functions compiled for v4 work with v5.

Procedure

  1. Remove the register() method.
  2. Change the visibility of the default constructor to be public. No other visibility (for example, protected) is allowed. Otherwise, an exception is generated when you try to execute the function.
  3. Remove the super(String, String, int, int) call in the default constructor.
    This super constructor does not exist anymore, so any calls to it produce an error. This call is replaced by the information that is contained in the extension definition.
  4. Remove the method getSyntax(). This information is now contained in the extension definition.
  5. Create an extension to provide HCL OneTest API with details about your function (see Exposing the function).