Use the Template Editor dialog to view and edit issue-tracking templates.
Note: | This topic describes how to create global templates. Creating project-specific templates is similar, however, you can create them only in TestComplete. |
Opening the Editor
-
Right-click the TestExecute icon () in the notification area (tray) and select Issue Tracking | Template Manager from the context menu.
The dialog lists all the available templates.
-
To add a new template, click Add in the Template Manager dialog.
To edit an existing template, select the needed template and click Edit.
-
TestExecute will show the Template Editor dialog.
Configuring a Template
-
In the Template editor, specify the template name and description in the Name and Description edit fields.
Note: The template name will be used as the name of the script method that will create or edit an item. So, the template name must be a valid identifier for the scripting language used in your project. The naming rules used in the scripting languages supported by TestExecute may slightly differ, so, in order for the method name to comply with the naming rules of any scripting language, use only alphanumeric and underscore characters in it and start the name with a letter.
The template name should not coincide with the name of another template, since theIssueTracking
object cannot contain two methods having the same name.We recommend that you make the names descriptive. This will make it easier for other testers working with your project to use the template you created. For instance, the name
CreateBugReportInMyProject
is more informative and than justBugReport
. Another good guideline is to start method names with a verb. -
Click the ellipsis button to the right of the Connection edit box. TestExecute will display the Connection Manager dialog that lists the existing connections to issue-tracking databases:
You can either select an existing connection from the list or create a new connection. To create a connection, click Add and then follow the instructions in the Connection Wizard.
-
Once you create a connection to the desired database, TestExecute will display the connection in the Connection Manager. Choose the desired connection in the list and click OK. TestExecute will close the Connection Manager and show the connection name in the Connection field of the Template Editor dialog.
TestExecute stores the connection settings on the computer where the connection was created. That is, if you or your colleague opens the project on another computer, you will have to create the connection on that computer (if the connection does not exist). Else, the template will be invalid. The connection settings are specific to your user account. If another user logs in to your computer and launches TestExecute, they will have to create the connection in order to make the template valid.
-
Choose the project to which the item will be added or to which the item belongs (if you are going to edit item fields). To select the project, click the ellipsis button in the Project edit box and select the needed project in the Select Project dialog.
-
Specify the item type in the Item Type edit box. You can click the ellipsis button and select the needed item type in the Select Item Type dialog.
-
A template can create a new or edit an existing item in the selected issue-tracking system. If a template is intended for editing:
-
Select the Edit Item check box in the Template Editor dialog.
-
Specify the identifier of the item to be edited:
If you want to use the template to create items, do not select the Edit Item check box.
-
-
Create template fields and map these fields to item fields:
-
Click Add in the Template Fields section. TestExecute will open the Select Fields dialog:
In the dialog, choose the item fields you want to map to template fields.
-
In the Template Field column, specify template fields. They will be used as template parameters.
-
In the Value column, specify the default parameter values. TestExecute will use them if you omit parameters when calling your template from tests.
-
-
Click OK to save the template.