Objectives of this Article
- Introduction to Virtual User Technology
- Record scripts
- General options
- Recording options
- Runtime options
- Replay recorded scripts
Virtual User Technology
- Simulates a real user
- Requires less resources machines and people
- Greater control over test execution
- Can synchronize actions performed by users
- Collect and analyze results in a better way
- VUsers can communicate directly with a server by executing calls to the
- server API-without relying on client software
VuGen
- Capture a business transaction by recording user actions performed
- Monitors the communication between the application and the server
- Generates the required function calls
- Inserts the generated function calls into a Vuser script
Recording a Script
{mosgoogle}
New VUser
- Click on New Vuser
- Select the new Virtual User from the list of protocols
- Click OK
- The required header files are automatically included in the script
Vuser Script Sections
Script Section |
Used when recording... |
Is executed when... |
vuser_init |
a login to a server |
the Vuser is initialized (loaded) |
Actions |
client activity |
the Vuser is in "Running" status |
vuser_end |
a logoff procedure |
the Vuser finishes or is stopped |
Recording Options
Recording Mode
This allows us to specify the information to be recorded and which functions to be used when generating a script
HTML Mode
The HTML mode is based on user actions, and the scripts contain functions that correspond directly to the action taken.
Example:
...
web_link(Enterprise Systems Performance",
"Text=Enterprise Systems Performance ",
"Snapshot=t4.inf",
LAST);
URL Mode
The URL mode is based on HTTP requests sent to the server as a result of user actions.
Example:
. . .
web_url(Enterprise Systems Performance",
"URL=http://www.in.ibm.com/esp.html",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http:// www.in.ibm.com/atc?. . . ,
"Snapshot=t4.inf",
"Mode=URL",
LAST);
Deciding on Recording Mode
HTML Mode |
URL Mode |
Intuitive and easy to understand |
Not as intuitive as the HTML scripts |
Scalable |
More scalable and effective for creating a load test |
Deciding on Modes
- For browser applications, use HTML mode.
- For non-browser applications, use URL mode.
Note: The option of mixing recording modes is available for very advanced users for performance tuning
Other Recording Options
Selecting the Browser
Proxy Settings
Advanced Settings
Recording Scripts
- Click on Red Record Button
-
Record dialog box pops up.
- Click black Stop button to end recording
- Save the script.
Note:
Record user transaction is the appropriate sections
Do not name a script init, run, or end, as these names are used by VuGen.
------------- http://www.quick2sms.com - Send Unlimited FREE SMS to Any Mobile Anywhere in INDIA,
Click Here
|