Customizing a script template
Functional Tester uses its default script templates to format and provide basic information when you create a script. You can customize the information and format by customizing the 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.
To customize a script template:
Procedure
- Right-click a functional test project in the Functional Tester Projects view, click Properties > Functional Tester Script Templates from the pop-up menu.
The Functional Tester Script Templates Property page is displayed.- In the Select template type list, click the script template to customize.
- Edit the script template from the Functional Test Script Templates Property page:
- Edit the script template using the appropriate placeholder. For information about placeholders, see Customizing Script Templates related topic.
- Optionally, click Apply to save your edits as you work or when you finish changes to one script template.
- Click OK to save all edits to all script templates.
- If you use ClearCase®, check out the script template(s) by checking out the Functional Tester project. When you click Apply or OK, the ClearCase Check Out dialog box opens to check out the file before you save it. In the Check Out dialog box, click Finish to check out the script template. Click Apply to save your edits as you work or when you finish changes to one script template or click OK to save all edits to all script templates.
You can also edit a script template with the Java editor in Functional Tester, Java Scripting or the Code Editor in Functional Tester, VB.NET Scripting. Click Open current template in Editor to open the template in the appropriate editor.
Tip: To omit associated punctuation for any null properties, enclose the placeholder in a pair of carets (^). For example:
^%map:contextComment%^
- Customizing script templates
You can customize the default script templates that Functional Tester uses to format and provide basic information when you create a script.- Default placeholders
You can use default placeholders to customize the systemwide placeholders such as properties, date, and time of any script template.- Object map property placeholders
The object map property placeholders resolve object map placeholder values into property values. They also resolve default placeholder values.- Script placeholders
Script placeholders resolve script-level placeholder values into script values. As the values are resolved, several lines of information can be cached, depending on the placeholder.- VP placeholders
VP placeholders resolve Test Object and verification point (VP) placeholder values into property strings. Default placeholders values are also resolved.- Script helper superclass placeholders
You can use the script helper superclass placeholders to customize the Script Helper Parent, the Header of the file template.