Creating a script helper superclass
By
default, all Functional Test scripts extend the RationalTestScript
class,
and thereby inherit a number of methods (such as callScript). If you are an
advanced user, you might want to create your own helper superclass, which
extends RationalTestScript
and adds additional methods or
overrides the methods from RationalTestScript
.
Before you begin
About this task
To create a script helper superclass for a script:
Procedure
- Click View
Menu button next to the New button
on the product toolbar and click Helper Superclass.
or click the The Create Script Helper Superclass dialog box opens.
- In the folder field, either enter the appropriate path to the folder or use the navigation tools ( Home , Back , and Go Into ) to select the path that contains the project for which you want to create a helper superclass.
- Select a project name in the project list.
- Enter a class name in the Script name field.
- Click Finish. HCL OneTest™ UI creates a new script in the Java™ Editor that you can use to manually enter Java™ code. The cursor appears at the top of the script.
- Enter the methods and member variables you want to make available to the script.
Results
Note: When you create a script helper superclass, you can
override base-level functionality from the RationalTestScript
class.