Releasing your

Oracle performance

potential

Parameterize a script

After recording and saving a user session you can replace recorded keyboard values which have been entered during the recording session with parameters. Particularly for a user session where data has been inserted, deleted or updated using the recorded keyboard values will often fail due to violation of integrity constraints, i.e. primary keys. But also for 'read only' user sessions, replacing static keyboard values with parameters (parameterization) is very useful to touch a representative number of records in the database during a load test.

Tip: Before you parameterize the script be sure that the script runs fine and that you have made a backup of the script before editing the script.

Forms2test supports parameterization of a script with the Script Editor. With the Script Editor the available recorded keyboard values can be replaced with the following parameter types:

  • Constant literal value;
  • Random numerical value;
  • Random alphanumeric value;
  • Unique numbering (sequence);
  • Value from a list (lov);
  • Value from another parameter.

During playback all parameters for each virtual user will be replaced with dynamic runtime values. For example, when you have defined a sequence parameter the first virtual user uses the start value of the sequence, the second virtual user uses the start value plus one, etc.

Script Editor

The Script Editor can be launched from the "record" tab using the tool bar of a script (see image).

script editor

The recorded keyboard values which can be replaced with a parameter are shown in the left pane of the Script Editor together with the Transactions and Think times. The script parameters (if defined) are shown at the right pane (see image).

parameter editor

The recorded keyboard values can be replaced with a parameter using the shuttle button or alternatively you can double click on the value. Then the parameter wizard opens to define in three steps the (1) parameter name, (2) parameter type and the parameter properties (3).

Parameter name
Each parameter should have a name. With this name it is possible to replace all parameters with the same name with the same runtime value for a virtual user.

png

Parameter type
Each parameter should have a parameter type. You can choose from six parameter types:

png

The next step is to define the parameter properties for the parameter type of step 2.

For a random number you should define the minimum (inclusive) and maximum (inclusive) for the random number parameter.

png

For a random alphanumeric value (random text) you have to provide the minimum length and the maximum length. At runtime the parameter value will consist of at least minimum length and no more than maximum length arbitrary ASCII characters.

For a sequence number you have to provide the start and increment value. Then for each virtual user the parameter value will be increased by the increment value.

png

For a list of values you have to select the file containing the list of values. The list of values file is a flat ASCII file with the file extension .lov. Each line in the file contains one value. The list of values will be cyclically reused as often as necessary.

Copyright © 2007 TestNext Software & Services B.V., The Netherlands. All rights reserved.