About Customizing Script Templates

Functional Tester uses its default script templates to format and provide basic information when you create a script. You can customize the information and the format by customizing the default script templates.

To customize a script template, use the Functional Tester Script Templates Property Page. In Functional Tester, Java Scripting, you can also use the Java editor, which provides simple formatting of the template and help with the Java syntax. In Functional Tester, VB.NET Scripting, you can use the Code editor.

Several types of script templates are available:

Script: Header of the file -- Customizes the layout of new script files.

Script: Comment for Test Object -- Customizes a test object comment line inserted into a script by the recorder.

Script: Comment for top level Test Object -- Customizes a top-level test object comment line inserted into a script by the recorder.

Script: HTML Test Object Name -- Customizes the names of HTML test objects in a script.

Script: Java Test Object Name -- Customizes the names of Java test objects in a script.

Script: .Net Test Object Name -- In Functional Tester, Java Scripting, customizes the names of .NET test objects in a script.

Script: Windows Test Object Name -- In Functional Tester, VB.NET Scripting, customizes the names of Windows test objects in a script.

VP: Verification Point Default Name -- Customizes the names of verification points that Functional Tester generates by default in the Verification Point and Action Wizard.

Script Helper: Header of the file -- Customizes the layout of a helper class when auto-generated.

Script Helper: Test Object Method -- Customizes the layout of test object methods in the helper class.

Script Helper: Verification Point Method -- Customizes the layout of verification point methods in the helper class.

Script Helper Superclass -- (Functional Tester, Java Scripting) -- Customizes the layout of the script helper superclass.

Script Helper Base Class -- (Functional Tester, VB.NET Scripting) -- Customizes the layout of the script helper base class.

You use placeholders in the script template to include information in each script that you generate. There are five types of placeholders:

The following table lists the placeholders available for each script template:

Script Template

Placeholder

Script: Header of the file

Default Placeholders and Script Placeholders

Script: Comment for Test Object

Default Placeholders and Object Map Property Placeholders

Script: Comment for top level Test Object

Default Placeholders and Object Map Property Placeholders

Script: HTML Test Object Name

Default Placeholders and Object Map Property Placeholders

Script: .Net Test Object Name (Functional Tester, Java Scripting only)

Default Placeholders and Object Map Property Placeholders

Script: .Net and Windows Test Object Name (Functional Tester, VB.NET Scripting only)

Default Placeholders and Object Map Property Placeholders

Script: Java Test Object Name

Default Placeholders and Object Map Property Placeholders

VP: Verification Point Default Name

Default Placeholders, VP Placeholders, and Test Object Placeholders

Script Helper: Header of the file

Default Placeholders and Script Placeholders

Script Helper: Test Object Method

Default Placeholders and Script Placeholders

Script Helper: Verification Point Method

Default Placeholders and Script Placeholders

Script Helper Parent: Header of the File (Functional Tester, Java Scripting only)

Default Placeholders and Script Helper Super Class Placeholders

To omit associated punctuation for any null properties, enclose the placeholder in pairs of carets (^). Functional Tester removes everything between the carets if the placeholder does not resolve to a valid value. For example, the underscore separator is removed if the #name property is null:

^%map:#name%_^%map:#role%.

Related Topics:

Customizing a Script Template

Functional Tester Script Templates Properties Page

 

Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.