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

  1. Click File > New > Helper Superclass or click the View Menu button View Menu next to the New button on the product toolbar and click Helper Superclass.
    The Create Script Helper Superclass dialog box opens.
  2. In the folder field, either enter the appropriate path to the folder or use the navigation tools ( Home Home button, Back Back button, and Go Into Go Into) to select the path that contains the project for which you want to create a helper superclass.
  3. Select a project name in the project list.
  4. Enter a class name in the Script name field.
  5. Click Finish.
    Rational® Functional Tester 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.
  6. 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.

What to do next