Extending HCL OneTest API functionality using custom functions

You can add more calculations and operations to tests by using the HCL OneTest™ API custom function class. HCL OneTest API custom function is a Java™ class that extends com.ghc.ghTester.expressions function.
Note: All custom functions can be called from HCL OneTest API scripting languages (ECMAScript and Legacy).

The following steps provide an overview of how to develop a function for use in HCL OneTest API:

  1. Create a plug-in, which is a Java code wrapper that allows the plug-in to be loaded into HCL OneTest API. Using the Eclipse IDE for Java EE is the easiest way to create a plug-in, but you can also create a plug-in from a different IDE.
  2. Develop your function class, which involves creating a Java class and implementing the function behavior. If you have an existing function and want to modify it to work with HCL OneTest API, you must convert existing function classes with Eclipse.
  3. Create a function extension point to provide HCL OneTest API with details about your function, such as its name and the class that implements the function.
  4. Configure and use the function in HCL OneTest API, which lets HCL OneTest API load your function to be used inside your HCL OneTest API project.