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:
Default placeholders -- Available for any of the script templates.
Script placeholders -- Use in the following types of script templates:
Script: Header of the file
Script Helper: Header of the file
Script Helper: Test Object Method
Script Helper: Verification Point Method
VP placeholders -- Use in the VP: Verification Point Default Name script template.
Object Map Property placeholders -- Use in the following types of script templates:
Script: Comment for Test Object
Script: Comment for top level Test Object
Script: HTML Test Object Name
Script: Java Test Object Name
Script: .Net Test Object Name
Script: Windows Test Object Name
Script Helper Super Class placeholders -- Use in the Script Helper Parent: Header of the file template.
The following table lists the placeholders available for each script template:
Script Template |
Placeholder |
---|---|
Script: Header of the file |
|
Script: Comment for Test Object |
|
Script: Comment for top level Test Object |
|
Script: HTML Test Object Name |
|
Script: .Net Test Object Name (Functional Tester, Java Scripting only) |
|
Script: .Net and Windows Test Object Name (Functional Tester, VB.NET Scripting only) |
|
Script: Java Test Object Name |
|
VP: Verification Point Default Name |
Default Placeholders, VP Placeholders, and Test Object Placeholders |
Script Helper: Header of the file |
|
Script Helper: Test Object Method |
|
Script Helper: Verification Point Method |
|
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:
Functional Tester Script Templates Properties Page
Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.