How to Create or Open a Vuser Script

Create a new Single/multiple protocol script

  • Use the protocol advisor to select a script type : You can use the protocol advisor to produce a list of relevant types of Vuser scripts based on your application. For details, see "Protocol Advisor
  • Create a new single protocol script: Select File > New > New Single Protocol Script and select the type of protocol. For user interface details.
  • Create a new multiple protocol script:  Select File > New > New Multiple Protocol Script and move the desired protocols from the Available Protocols list to the Selected Protocols list.

Open a regular script

  • To open a script stored on your local machine or a network drive, select File > Open
  • Open or work with a .zip script You can unzip or work with a script in .zip format. VuGen allows you to work with .zip file in several ways. The advantages of working with .zip files is that you conserve disk space, and it allows your scripts to be portable. Instead of copying many files from machine to machine, you only need to copy one .zip file.
    • Import from a .zip file: To open a script stored in a .zip file, select File > Zip Operations > Import from Zip File. After you select a .zip file, VuGen prompts you for a location at which to store the unzipped files.
    • Work from a .zip file: To work from a .zip file, while not expanding or saving the script files, select File > Zip Operations > Work from Zip File. When you modify the script and save it, the changes are stored directly in the .zip file.
    • Save scripts in .zip format:To save the entire script directory as a .zip file, select File > Zip Operations > Export to Zip File. You can indicate whether to save all files or only runtime and specify the compression ratio. The greater  the compression ratio, the longer VuGen takes to create the archive (Maximum compression option is the slowest).
    • Compress and email a script: To create a .zip file and send it as an email attachment, select File > Zip Operations > Zip and Email. When you click OK in the Zip To File dialog box, VuGen compresses the file according to your  settings and opens an email compose form with the .zip file as an attachment.

How to Import Code from a Script

  • Select Actions > Import Action into Vuser, or right-click the Task pane and select Import Action into Vuser from the right-click menu. The Import Action dialog box opens.
  • Click Browse to select a Vuser script. A list of the script’s actions appears in the Actions to Import section.
  • Highlight an action and click OK. The action appears in your script.

How to Regenerate a Vuser Script

If you need to revert back to your originally recorded script, you can regenerate it. This feature is ideal for debugging, or fixing a corrupted script. When you regenerate a script, it removes all of the manually added enhancements to the recorded actions. If you added parameters to yourscript, VuGen restores the original values. The parameter list, however, is not deleted; you can reinsert parameters that you created earlier. Note that regeneration only cleans up the recorded actions, but not those that were manually added.

  • Initialize the regeneration: Select Tools > Regenerate Script. VuGen issues a warning indicating that all manual changes will be overwritten.
  • Modify regenerate options - optional: Click Options to open the Regenerate Options dialog box. In a multiple protocol script, you can modify which protocols you want to record when the script is regenerated from the General > Protocols
    node. To change the Script options, select the General > Script node and select or clear the appropriate check box.