Creating a script helper base class
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 base class, which extends RationalTestScript
and
adds additional methods or overrides the methods from RationalTestScript
.
About this task
To create a script helper base class for a script:
Procedure
- Click . The Add New Item dialog box opens.
- In the Name field, enter a class name.
- In the Location field, enter the appropriate path to the folder or click Browse to select the path that contains the project for which you want to create a helper base class.
- Click Open.HCL OneTest™ UI creates a new script in the Code Editor that you can use to manually enter VB.NET code. The cursor appears at the top of the script.
- Enter the methods and member variables you want to make available
to the script.Note: When you create a script helper base class, you can override base-level functionality from the
RationalTestScript
class.