Configure runtime settings manually
To configure Vuser runtime settings manually , you modify the default.cfg and default.usp files created with the script. The default.cfg file contains the setting for the General, Think Time, and Log options. The default.usp file contains the setting for the Run Logic and Pacing.
These runtime settings correspond to VuGen's runtime settings (see Configure runtime settings).
General options
There is one General option for Linux Vuser scripts:
ContinueOnError instructs the Vuser to continue when an error occurs. To activate the option, specify 1. To disable the option, specify 0.
In the following example, the Vuser will continue on an error.
[General] ContinueOnError=1
Think time options
You can set the think time options to control how the Vuser uses think time during script execution. You set the parameters Options, Factor, LimitFlag, and Limit parameters according to the following chart.
Option
|
Options
|
Factor
|
LimitFlag
|
Limit
|
---|---|---|---|---|
Ignore think time
|
NOTHINK
|
N/A
|
N/A
|
N/A
|
Use recorded think time
|
RECORDED
|
1.000
|
N/A
|
N/A
|
Multiply the recorded think time by...
|
MULTIPLY
|
number
|
N/A
|
N/A
|
Use random percentage of recorded think time
|
RANDOM
|
range
|
lowest percentage
|
upper percentage
|
Limit the recorded think time to...
|
RECORDED/ MULTIPLY
|
number (for MULTIPLY)
|
1
|
value in seconds
|
To limit the think time used during execution, set the LimitFlag
variable to 1 and specify the think time Limit
, in seconds.
In the following example, the settings tell the Vuser to multiply the recorded think time by a random percentage, ranging from 50 to 150.
[ThinkTime] Options=RANDOM Factor=1 LimitFlag=0 Limit=0 ThinkTimeRandomLow=50 ThinkTimeRandomHigh=150
Log options
You can set the log options to create a brief or detailed log file for the script's execution.
[Log] LogOptions=LogBrief MsgClassData=0 MsgClassParameters=0 MsgClassFull=0
You set the parameters LogOptions, MsGClassData, MsgClassParameters, and MsgClassFull variables according to the following chart:
Logging Type
|
LogOptions
|
MsgClassData
|
MsgClassParameters
|
MsgClassFull
|
---|---|---|---|---|
Disable Logging
|
LogDisabled
|
N/A
|
N/A
|
N/A
|
Standard Log
|
LogBrief
|
N/A
|
N/A
|
N/A
|
Parameter Substitution (only)
|
LogExtended
|
0
|
1
|
0
|
Data Returned by Server (only)
|
LogExtended
|
1
|
0
|
0
|
Advanced Trace (only)
|
LogExtended
|
0
|
0
|
1
|
All
|
LogExtended
|
1
|
1
|
1
|
In the following example, the settings tell the Vuser to log all data returned by the server and the parameters used for substitution.
[Log] LogOptions=LogExtended MsgClassData=1 MsgClassParameters=1 MsgClassFull=0
Iterations and run logic
You can set the Iteration options to perform multiple iterations and control the pacing between the iterations. You can also manually set the order of the actions and their weight. To modify the run logic and iteration properties of a script, you must edit the default.usp file.
To instruct the Vuser to perform multiple iterations of the Actions section, set RunLogicNumOfIterations to the appropriate value.
To control the pacing between the iterations, set the RunLogicPaceType variable and its related values, according to the following chart:
Pacing
|
RunLogicPaceType
|
Related Variables
|
---|---|---|
As soon as possible
|
ASAP
|
N/A
|
Wait between Iterations for a set time
|
Const
|
RunLogicPaceConstTime
|
Wait between iterations a random time
|
Random
|
RunLogicRandomPaceMin, RunLogicRandomPaceMax
|
Wait after each iteration a set time
|
ConstAfter
|
RunLogicPaceConstAfterTime
|
Wait after each iteration a random time
|
After
|
RunLogicAfterPaceMin, RunLogicAfterPaceMax
|
In the following example, the settings tell the Vuser to perform four iterations, while waiting a random number of seconds between iterations. The range of the random number is from 60 to 90 seconds.
[RunLogicRunRoot] MercIniTreeFather="" MercIniTreeSectionName="RunLogicRunRoot" RunLogicRunMode="Random" RunLogicActionOrder="Action,Action2,Action3" RunLogicPaceType="Random" RunLogicRandomPaceMax="90.000" RunLogicPaceConstTime="40.000" RunLogicObjectKind="Group" RunLogicAfterPaceMin="50.000" Name="Run" RunLogicNumOfIterations="4" RunLogicActionType="VuserRun" RunLogicAfterPaceMax="70.000" RunLogicRandomPaceMin="60.000" MercIniTreeSons="Action,Action2,Action3" RunLogicPaceConstAfterTime="30.000"