Parameterization overview

When you record a business process, VuGen generates a script that contains the actual values used during recording. Suppose you want to perform the script's actions (such as query or submit) using different values from those recorded. To do this, you replace the recorded values with parameters. This is known as parameterizing the script.

The resulting Vusers substitute the parameter with values from a data source that you specify. The data source can be either a file, or internally generated variables. For details, see Parameter types.

Delimiters

Parameters appear inside a Vuser script within parameter delimiters. By default, VuGen uses "{" and "}" as the left and right parameter delimiters, but you can modify these delimiters if required. In addition, you can modify the background color and outline color of parameters in a script. For details, see Scripting Options tab.

Script section as recorded.

"value=UNIX"

Script section after "UNIX" has been replaced with the "Operating System" parameter.

"value={Operating System}"

Back to top

Input/output parameters

You can parameterize only the arguments within a function. You cannot parameterize text strings that are not function arguments. In addition, not all function arguments can be parameterized. For details on which arguments you can parameterize, see the Function Reference (select the relevant version) for each function.

Input parameters are parameters whose values you define in the design stage before running the script. Output parameters you define during design stage, but they acquire values during test execution. Output parameters are often used with Web Service calls. Use care when selecting a parameter for your script during design stage, make sure that it is not an empty output parameter.

Example:

In a Vuser script recorded while operating a Web application, VuGen generated the following statement that searches a library's database for the title UNIX:

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

When you replay the script using multiple Vusers and iterations, you do not want to repeatedly use the same value, UNIX. Instead, you replace the constant value with a parameter:

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

For task details, see Create parameters.

Back to top

Correlation

To enable some recorded Vuser scripts to replay correctly, it may be necessary to implement correlation. Correlation is used when a recorded script includes a dynamic value (such as a session ID) and therefore cannot be successfully replayed. To resolve this, you convert the dynamic value into a variable—thereby enabling your script to replay successfully. For details, see Correlation overview.

Back to top

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 parameterization, each Vuser is assigned parameter values from a dedicated set of values - parameter values are not shared between Vusers. In contrast, VTS enables you to assign parameter values from a single set of parameter values to multiple Vusers. This may enable you to more accurately emulate a real-user environment.

For more information, see VTS overview.

For details on how to use VTS functionality in TruClient Vuser scripts, see Use VTS in TruClient scripts.

Back to top