Share this page

# Parameterize scripts

This section describes how to create and modify parameters for Vuser scripts.

In this topic:

## About parameterization

When you record a business process, VuGen generates a script that contains the actual values used during recording. Suppose you want to perform an action, for example submit,using a different value from that what was recorded. To do this, you replace the recorded values with a parameter. This is known as parameterizing the script.

In the following example, VuGen recorded a Web application and generated a function that searches a library's database for the title Linux:

     web_submit_form("db2net.exe",
            ITEMDATA,
            "name=library.TITLE",
             "value=Linux",
            ENDITEM,
            "name=library.AUTHOR",
            "value=",
            ENDITEM,
            "name=library.SUBJECT",
            "value=",
            ENDITEM,
            LAST);

When you replay the script using multiple Vusers and iterations, you will want to check if the Web application can search for other titles, aside from Linux. To accomplish this, you use the VuGen interface to replace the constant value, Linux, with a parameter called Book_Title.

     web_submit_form("db2net.exe",
            ITEMDATA,
            "name=library.TITLE",
             "value={Book_Title}",
            ENDITEM, …

During replay, Vusers substitute the parameter with values from a data source that contains several terms, for example Windows, Security, and Upgrade. The data source can be a file, XML code, or internally generated variables. For details, see Parameter types.

## Delimiters

Parameters appear inside a Vuser script within delimiters. By default, VuGen uses "{" and "}" as the left and right parameter delimiters, but you can modify these delimiters if required. You can also modify the background and outline color of parameters in a script.

    …
    "value={Book_Title}",
    …

For details, see the Scripting tab in the Options dialog box.

## Input and output parameters

You parameterize values that are function arguments. You can define parameters for both input and output arguments.

Input parameters are parameters whose values you define in the design stage before running the script. Output parameters are also defined during the design stage, but they acquire their values during test execution. Output parameters are commonly used with Web Service calls.

Certain functions contain arguments that cannot be parameterized. When defining Output parameters make sure that the argument can accept a value. If the Output argument to which you assign a parameter is empty, it may cause your script to fail. For details on which arguments you can parameterize, see the Function Reference for each function.

## VTS and parameterization

VTS (Virtual Table Server) is a web-based application that works with Vuser scripts. VTS offers an alternative to standard VuGen parameterization.

When you use standard VuGen parameterization, each Vuser is assigned parameter values from a dedicated set of values. Parameter values are not shared between Vusers.

VTS assigns values from a set of predefined values to multiple Vusers. This method generally emulates a true user environment more accurately.

## See also

- Parameter types
- Create parameters
- Use VuGen
- Correlate scripts

- Virtual Table Server

- Use VTS in TruClient scripts

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: