Create Vuser script templates

This topic describe saving a Vuser script as a template for future scripts, and working with the script templates.

About user-defined templates

You can save a script with a specific configuration as a user-defined template. You can then use this template as a basis for creating future scripts.

User-defined templates support the following files and data:

  • Runtime settings

  • Parameters

  • Extra files

  • Actions

  • Snapshots

Generic settings, such as Recording options and General options, are not supported as they are not relevant to a specific script.

Back to top

Create a Vuser script template

  1. Open a script in VuGen.
  2. Select File > User-Defined Templates > Export to Template.
  3. Enter a name and location for the template.
  4. Click OK to create the template.

Back to top

Create a Vuser script from a template

Select File > New Script and Solution > VuGen > User Templates and select the template file (only available after your create at least one template).

Back to top

Rename a Vuser script template

  1. Select File > User-Defined Templates > Manage from Explorer
  2. In the Explorer dialog box:

    1. Rename the content file (.zip).
    2. Rename the description file (.xpt).
  3. Using a text editor, modify the following tags in the .xpt file:

    1. Name tag: <Name>NewName </Name>
    2. File tag src property: <File name="template_temp.zip" src="NewName.zip" binary="True" />

Back to top

Template guidelines

  • If you configure a script for a specific protocol and then save the script as a template, further scripts based on that template will work only with that same protocol.

  • After you create a template, you cannot edit it directly in VuGen. To make any changes, open the template and save it again with another name or overwrite the existing template.

  • If you regenerate an original script from a template, you will lose all of your manual changes.

Back to top

See also: