Changing the default script helper superclass

By default, all Functional Test scripts extend the RationalTestScript class, and thereby inherit a number of methods (such as callScript). Advanced users may want to create their own helper superclass which extends RationalTestScript and can add additional methods or override the methods from RationalTestScript.

About this task

You can specify a helper superclass that Rational® Functional Tester will use whenever you create or record a script in your project. This default superclass is specified in the Functional Test Project Properties page. You can also specify a helper superclass for an individual script in the Functional Test Script Properties Page. Once a script has been created, it retains the reference to the default superclass as its own helper superclass.

To change the default script helper superclass for a project:

Procedure

  1. Select a project in the Projects view.
  2. Right-click and select Properties.
  3. Click Functional Test Project.

    The Functional Test Project Properties page opens. The helper superclass listed here will be used by default for all new scripts created or recorded in this project.

    Note: This is a user-specific preference and will not be shared by other users of this project.
  4. To change the default superclass for the selected project, enter the fully-qualified class name of your custom helper superclass in the Default Script Helper Superclass field. Note that your helper superclass must extend RationalTestScript.

Results

Note: If you change your superclass and then want to reset it back to RationalTestScript later on, you can either type RationalTestScript in the superclass field or just clear the field. Leaving this field blank resets the script so that it uses RationalTestScript.

To change the script helper superclass for an individual script:

Procedure

  1. Select a script in the Projects view.
  2. Right-click and select Properties.
  3. Click Functional Test Script.

    The Functional Test Script Properties Page opens. The helper superclass listed here will be used for the script you selected.

  4. To change the default superclass for the selected script, enter the fully-qualified class name of your custom helper superclass in the Helper Superclass field. Note that your helper superclass must extend RationalTestScript.

Results

Note: If you change your superclass and then want to reset it back to RationalTestScript later on, you can either type RationalTestScript in the superclass field or just clear the field. Leaving this field blank resets the script so that it uses RationalTestScript.