Documente Academic
Documente Profesional
Documente Cultură
IVS-TRAINING
Ground Rules
Stick to timeliness
Correlation
Limitations
You can use parameterization only for the arguments
within a function.
Parameter Types
Ex. Flat files, .DAT files or using the Data Wizard to import
from the database.
User-Defined Functions : It replaces the parameter with a
value returned from a function located in an external DLL
(Dynamic link library).
Parameter Types
For example, BroadVision servers create session IDs that are always placed
between the same delimiters: ”BV_SessionID=” on the left, and ”&” on the
right.
BV_SessionID=@@@@1303778278.0969956817@@@@&
If you are recording a session with a supported application server, you can use
one of the existing rules built-in to VuGen. An application server may have more
than one rule. You can enable or disable a specific rule by selecting or clearing
the check box adjacent to the rule. VuGen displays the rule definitions in the right
pane.
Before Recording - User Defined Rule Correlation
HTTPS Configuration - The LoadRunner agent tries to establish a connection with the
MI Listener using the proxy port specified in the Proxy Port field. To enable this
connection, allow an outgoing connection for the HTTPS service on the firewall for port
443. This causes the agent to keep trying to connect to the MI Listener at intervals
specified (in seconds) in the Connection Timeout field of the agent configuration. On
successful connection, the agent on the proxy server connects to the MI Listener, and the
MI Listener connects back to the agent through the proxy server. From this point on, the
agent listens to commands from the MI Listener.
Monitoring … Steps (contd…)
The TCP configuration requires every Load Runner agent machine behind the
Firewall has to be allowed to open a port in the firewall for outgoing
communication. If this is the firewall configuration at hand, use the TCP
configuration.
HTTPS Configuration
In the HTTPS configuration, only one machine (the proxy server) is allowed to
open a port in the firewall. Therefore it is necessary to tunnel all outgoing
communications through the proxy server
MI Listener Installation and Configuration
To enable running Vusers or monitoring over a firewall, you need to install the MI
Listener on one or more machines outside the firewall in the same LAN as the
Controller and configure it.
Notes:
To run Vusers or monitor servers inside the firewall, you need to create a unique
connection between the Controller and the agent machine. This connection is
made through the Mercury Interactive listener machine ("MI Listener"), which
serves as a router between the Controller and the LoadRunner agent. To
establish this connection, you configure the Controller machine to define the
agent machine as a load generator.
Databases
Application
servers
Virtual users with Web
IP Spoofer Routers serve
r
103.14.255.200
200.37.66.9
Load Requests from
Requests from balancing 103.14.255.200
200.37.66.9 system go to Database
144.100.105.88 go to Database Server 2
Server 1
Requests from
144.100.105.88
go to Database
Server 3
IP Address usage by Load Balancing Systems
Databases
Application
servers
Web
Virtual Routers serve
users r
200.37.66.9
200.37.66.9
200.37.66.9
200.37.66.9 Load
balancing
system
Virtual
Virtualusers
usersatatone
oneIP
IPaddress
addresscreate
create
unrealistic
unrealistic load on routers, applicationservers,
load on routers, application servers,
and backend databases
and backend databases
IP Spoofing
Databases
Application
servers
Virtual users with Web
IP Spoofer Routers serve
r
200.37.66.9
144.100.105.88
191.230.1.0
103.14.255.200
Load
balancing
system
Virtual
Virtualusers
usersfrom
frommany
many"spoofed"
"spoofed"IP IPaddresses
addresses
create
create realistic load on entire multi-tieredsystem
realistic load on entire multi-tiered system
How to Implement IP Spoofing
Run the IP Wizard on each Vuser host machine
Start
How To Implement IP Spoofing
IP Wizard Step 3 - Add IP addresses that will load balance your system.
Start
How To Implement IP Spoofing
Add Intranet/LAN Addresses Class C Example
199 . 199 . 199 . 0
netid hostid
3 bytes define the network;
1 byte defines up to 256 client nodes.
Class B Example
199 . 199 . 0 . 0
netid hostid
2 bytes define network;
Enter a range of IP 2 bytes define client nodes.
addresses representing TIP
nodes on a LAN
Your network Class A Example
administrator
199 . 0 . 0 . 0
can provide
199 . 199 . 1 . 0 netid hostid
valid IP
199 . 199 . 1 . 1 addresses for 1 byte defines the network;
your network 3 bytes define client nodes.
199 . 199 . 1 . 2
199 . 199 . 1 . 3
How To Implement IP Spoofing
IP Wizard Step 4 - IP Wizard Summary - Check Reboot now to update routing tables.
This ensures that the Web server remembers paths to virtual clients .
Start
How To Implement IP Spoofing
Connection Process
The connection process has two stages.
First, the users connect Load Runner to a local or remote Test Director
Web server. This server handles the connections between Load Runner
and the Test Director project.
Next, the user choose the project the user want Load Runner to access.
The project stores the scripts for the application the user are testing.
Note that Test Director projects are password protected, so the user
must provide a user name and a password.
Integration of Load Runner with Test Director
Steps:
Steps:
When we record and save the script, a number of important files are generated along
with the main file:, If we save the file as vuser
vuser.usr – Contain info about the virtual user type, AUT, Auction
files etc.
vuser.bak – A copy of the vuser.usr before the last save operation.
default.cfg – Contains the run-time settings as defined in Vugen
application.
vuser.asc – The original recorded API calls.
vuser.grds – Contains column headers for grids in the database
scripts.
Files Generated During Recording (Contd…)
default.usp – Contains script’s run-logic, including how the
actions sections run.
init.c – Exact copy of the Vuser_init function as seen in the
Vugen window.
run.c – Exact copy of Action function as seen in the Vugen
window.
end.c - Exact copy of the Vuser_end function as seen in the
Vugen window.
vdf.h – A header file of C variable definitions used in the script.
\Data – The Data directory stores all the recorded data used
primarily as backup. Once the data is in this directory, it is not
touched or used.
Files Generated During Replay
When the script is played back, following files are generated:
The driver is run takng vuser.ci and .user file as input. The .usr file
tells the driver which database to be used.
Choose Tools > Recording Options from the main menu or click
Options... in the Start Recording dialog box. The Recording Options
dialog box opens. Click the Script tab.
Start
Code generation language
The scripts can be written in Java also. Various java API’s are provided by LR which
can be used for generating the scripts.
Start
Code generation language
Open a DOS command window and go to the
<LOADRUNNER>/dat
directory.
Typethe following command:<LOADRUNNER>/bin/sed -f
web_to_java.sed filename > outputfilename
where filename is the full path and file name of the text file the
user saved earlier and outputfilename is the full path and
filename of the output file.
Iteration blocks
Iteration blocks are groups of actions within the Vuser script.
The user configure each block independently—its sequence, weighting, and
iterations.
Steps :
In the Pacing tab, right-click the word Run in the tree view and
choose Insert Actions Block. VuGen inserts a new Action block
with the next available index
Right-click the word Block and choose Insert Into Block >
Actions. The Select Actions list opens.
Select an action to add to the block
and click OK.
Note: User can only add actions that exist and
are displayed in the Actions section in VuGen's left pane.
Start
Iteration blocks (Contd …)
Setting an Action Sequence
Action blocks or individual actions can be executed either sequentially or randomly.
Choose Move Item Up or Move Item Down to modify the item's position.
In addition to these sections the vugen.dat file contains settings that indicate the OS and
other compilation related files.
mdrv.dat : This file contains separate section for each protocol defining the location of the
library files and driver executables. This file is modified, when we want to add a new Vuser
type/ Protocol.
Adding a new Vuser type / Protocol
To add a new Vuser type/Protocol, we need to :
www.mercury.com
Questions?
Thank You!!
IVS-TRAINING