Change the default script helper superclass
By default, all Functional Tester scripts extend the RationalTestScript class, and thereby inherit a number of methods (such as callScript). Advanced users may wish to create their own helper superclass which extends RationalTestScript and can add additional methods or override the methods from RationalTestScript.
You can specify a helper superclass that 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.
- Script helper superclass/base class
A helper superclass or base class is an optional, user-written class that provides override support for base-level methods, in particular, the event handler methods.- Create a script helper superclass
By default, all Functional Tester 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.- Change the default script helper superclass
By default, all Functional Tester scripts extend the RationalTestScript class, and thereby inherit a number of methods (such as callScript). Advanced users may wish to create their own helper superclass which extends RationalTestScript and can add additional methods or override the methods from RationalTestScript.
Related concepts
Script helper superclass/base class
To change the default script helper superclass for a project:
Procedure
- Select a project in the Functional Tester Projects view.
- Right-click and select Properties.
- Click Functional Tester Project.
The Functional Tester 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.
- 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
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
- Select a script in the Functional Tester Projects view.
- Right-click and select Properties.
- Click Functional Tester Script.
The Functional Tester Script Properties Page opens. The helper superclass listed here will be used for the script you selected.
- 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
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.