Action template in QTP

Action Template is a feature in QTP that allows you to include predefined template for every new actions by default. The template will be included automatically every time you create a new action.

This is a good practice to track few things like purpose, create by, revision history etc.

Example: If the below template is to be set as an action template,


'=========================================================================
'Action Name -
'Purpose -
'Created by -
'Date -

'Change History
'- - - - - - - - - - - - - -
'Date Changed by Comments
'
'=========================================================================

1. Open notepad and copy the above code to it.

2. Save the notepad as "ActionTemplate.mst"

NOTE: Use the double quote while saving the file as this wouldnt add .txt for the file extension.

3. Go to <dat> folder inside QTP installation folder.

Normally it can be found under C:Program Files\Mercury Interactive\QuickTest Professional\dat for versions of QTP below 11 and under C:Program Files\HP\Unified Functional Testing\dat for UFT 11.0 or above.

4. Add the ActionTemplate.mst file in the dat folder.

5. Open QTP and insert a new action. The new action should display the statements that you had saved in the Action Template.

Action Template in QTP