You are on page 1of 14

9/27/2005

Setup and Troubleshooting guide for running QuickTest


(GUI) Vusers from LoadRunner Controller

WHAT VERSION OF QUICKTEST PROFESSIONAL (QTP) IS SUPPORTED IN LOADRUNNER (LR)....1


QUICKTEST PROFESSIONAL 8.2, 8.0 6.5............................................................................................................................2
QUICKTEST PROFESSIONAL 6.5.........................................................................................................................................2
INSTALLATION REQUIREMENT...........................................................................................................................2

HOW TO RUN MORE THAN ONE QUICKTEST VUSER PER MACHINE......................................................2

HOW TO LAUNCH QUICKTEST FROM LOADRUNNER CONTROLLER.....................................................3

RUNNING QTP VUSER ON CITRIX/MS TERMINAL SERVER ........................................................................6


GENERAL OVERVIEW ON CITRIX/MTS...............................................................................................................................6
IMPLEMENTATION FOR RUNNING QTP SCRIPT ON CITRIX/MTS ..............................................................................................7
Setup the Citrix/MTS Server......................................................................................................................................7
Setup the Load Generator..........................................................................................................................................9
Setup the Controller...................................................................................................................................................9
TIPS AND TRICKS....................................................................................................................................................14
Q. Error; “The number is out of range” when increasing the Vuser number limit to run GUI Vuser.....................14
Q. Error; “Process "mdrv.exe" was not created on remote host "<IP address Reason: Communication error. Make
sure the Agent process or service is running on the remote machine.......................................................................14
Q. QTP Vuser hangs in pending state while starting the scenario...........................................................................14

What version of QuickTest Professional (QTP) is supported


in LoadRunner (LR)

Classification: Confidential
9/27/2005

LoadRunner Version Supported WinRunner version

LoadRunner 8.x QuickTest Professional 8.2, 8.0 6.5

QuickTest Professional 6.5


LoadRunner7.8 FP 1

Installation Requirement
• QuickTest Professional
• LoadRunner – The LoadRunner agent must be installed as a process.
• For Controller machine, apply the ‘Typical’ install.
• For the Load Generator machines, apply the Load Generator install.
(For LR 8.0 it is recommended to select the ‘Load generator’ radio button during
installation rather than do a Custom installation and check the ‘Load Generator’
component.)

• For LoadRunner 7.8 FP1 and 8.x, one needs GUI Vuser licenses to run QTP scripts.
Else you will get following error:

How to run more than one QuickTest Vuser per machine


Each QTP Vuser that you develop emulates a real user by submitting input to, and receiving
output from the OS. You can run only a single QTP Vuser on a Windows-based load generator. If
you would like to run more than one Vuser on a Load Generator, you can use a Citrix or
Terminal Server. For further detail, please refer to the ‘Running QTP Vuser on Citrix/MS
Terminal Server’ section.

Classification: Confidential
9/27/2005

How to launch QuickTest from LoadRunner Controller


1. Save a copy of the QTP script to the LoadRunner Controller machine.

2. If you plan to run the script on a remote machine, you still need to save a copy of the script in
the Controller machine. Ensure the following:

a. The QTP script runs fine on the remote machine using standalone QuickTest
Professional.

b. LoadRunner Agent process is started on the remote machine. To start the LoadRunner
Agent, go to Start  Programs  LoadRunner  LoadRunner Agent process.

Note: If the LoadRunner agent has already been installed as a service, change the agent
install by following the information on Problem ID 10464 - How to set the LoadRunner
Agent as a service or process after installation.

3. Bring up the LoadRunner Controller. You can select either Manual or Goal-Oriented
Scenario.

4. Click on “Browse” in the New Scenario window.

Classification: Confidential
9/27/2005

5. An “Open Test” window will pop-up. Change the “File of type” to “Astra scripts”

6. You will notice that when you navigate to a directory that has your QTP scripts, the
corresponding QuickTest script icons will show:

Classification: Confidential
9/27/2005

7. After adding this, the QTP script will be added to the LoadRunner Controller.

8. Highlight the group and the select ‘Details’. Check that the Type of the Vuser is “Astra GUI
Vuser” and also change the default quantity from 10 to 1.

8. Before you run the script, click on “Generators,” select the relevant host, and click on
“Details.” Make sure that “Other Vusers” is selected under the Vuser Limits tab. Also
ensure that the GUI/Winrunner is set to 1

9. You are now ready to run the QTP script from the LoadRunner Controller.

Classification: Confidential
9/27/2005

Running QTP Vuser on Citrix/MS Terminal Server


A QTP script runs into the Windows limitation of running only one virtual desktop per machine;
this however can be overcome by using the Citrix/MTS technology. This technology allows
running more than one QTP Vuser per machine.

General Overview on Citrix/MTS


Citrix/MTS environments are common in many enterprise environments. It allows the
deployment of a client/server application without having to perform a client installation on every
end-user machine. End-users are provided with a thin client, which allows them access to the
application by connecting to the Citrix/MTS server. It is common to confuse the Citrix/MTS
client with the operating system on the computer of which the thin client is running. An easy
way to check is to bring up the Task Manager on the machine and verify that the Application
under Test (AUT) is NOT running on the client machine but is in fact running on the Citrix/MTS
server.

Following are 2 common deployments for Citrix/MTS:

1. The Citrix client, Terminal services client, or Remote Desktop Connection (available with
Windows XP), is used to connect to the Citrix/MTS server. The end-user brings up the AUT
inside this client session. The negative aspect of this type of connection is that the user can
reformat the Citrix/MTS server disk drive if he has admin permissions.

2. The second common implementation of Citrix/MTS is where the session is integrated with
the application. A link on a webpage is the most common way used to launch the session on
the client machine that will provide access to the AUT. Unlike the above implementation, this
deployment is very restrictive. The end-user has access only to the AUT.

Classification: Confidential
9/27/2005

Implementation for running QTP script on Citrix/MTS


It is recommended that the setup be comprised of at least three computers:
• The Citrix/MTS Server machine with the AUT installed on it
• A machine running the LoadRunner Controller
• One or more Load Generator machines to run the Citrix session, Terminal sessions, or
Remote Desktop Connection.

Setup the Citrix/MTS Server


Install the LoadRunner Agent and QuickTest Professional on the Citrix/MTS Server:

1. LoadRunner:
a. Make sure that LoadRunner agent is installed as a process. Selecting ‘Manually Logon’
on the final step of LoadRunner installation does this:

Classification: Confidential
9/27/2005

When you do so, LoadRunner will put a shortcut to the startup folder by default. For
such, when you reboot, the agent process will be automatically started.

Note: If LoadRunner agent has already been installed as a service, change the agent
install by following the information on Problem ID 10464 - How to set the LoadRunner
Agent as a service or process after installation.

b. After rebooting from LoadRunner installation, kill the agent process by right mouse click
on the icon on the system tray, and select ‘close’. Then, set the ‘CitrixIsActive’ option:

i. For LoadRunner 7.8 or above:


Go to Start  Programs  LoadRunner  Advanced Setting  Agent
Configuration, and enable the checkbox for ‘Enable Terminal Services’
ii. For LoadRunner 7.6 or below:
Go to Start  Programs  LoadRunner  Advanced Setting  Agent Settings, the
br_lnch_server.cfg file will come up. Search for the [Citrix] section, and set
CitrixIsActive=1.

Then, restart the agent process from Start  Programs  LoadRunner  LoadRunner
agent process.

2. You are recommended to launch QTP and run your script once to make sure that it works fine
on the Terminal Server.

Classification: Confidential
9/27/2005

Setup the Load Generator

Start the Citrix client session, Terminal client sessions or Remote Desktop client session. Refer
to the manual of these products for instruction on starting a client session. Then,

1. Make sure that the LoadRunner agent process is started on the client session. It is represented
by icon on the system tray.

2. Make sure that


a. LoadRunner 7.8 or above: ‘Enable terminal services’ is set
b. LoadRunner 7.6 or below: ‘CitrixIsActive’ is set to 1

3. Make sure that you can run your QTP script without any problems on the client session.

If you have problems with any of the above, revisit the ‘Setup the Citrix/MTS Server’ section.

Setup the Controller


Note: The following setup is only available for LoadRunner when NOT running Vuser over
Firewall.

1. From the Controller, define the connection to load generators running on the Citrix/MTS
client session using the following convention:
< Terminal Server machine_name or IP>:1
< Terminal Server machine_name or IP>:2
< Terminal Server machine_name or IP>:3

Note:
• You have to manually to create each Citrix Client session. LoadRunner does NOT
automatically create these Terminal sessions. Then define one load generator in the
Controller for each Citrix client session that you have created.
• The suffix (1,2,3...) represents the client session number. Make sure that it does not
exceed the number of sessions that has been launched.

Classification: Confidential
9/27/2005

2. Right mouse click on each of the generator, select ‘Details…’ Then, go to the ‘Vuser Limits’
tab and make sure that “Other Vusers” checkbox is enabled.

3. If you have a large number of terminal sessions to be created, then it is cumbersome to add
every terminal session individually. At this point, it is recommended to create one Terminal
session correctly and set the Details for the same correctly. Then simply highlight this session
and copy it using ‘CTRL C’ and then simply highlight the empty rows in the ‘Load
Generators’ dialog box and then use ‘CTRL V’ to paste. The resultant window would be
similar to the following

Now go ahead and rename the load generators to recommended nomenclature of


< Terminal Server machine_name or IP>: <session number>.

After having renamed the session numbers correctly, the ‘Load Generators’ window would look
as below.

Classification: Confidential
9/27/2005

4. Ensure that in the Controller, the option for Scenario → ‘Enable IP Spoofer’ is NOT selected
while running QTP Vusers. This is not supported for running QTP Vusers.

Terminal Services manager Feature

For Loadrunner 7.8 FP1 and above there is a feature called Terminal Services Manager in
Generators-> Details-> Terminal Services
This feature allows you to connect to all the sessions just by using the <Terminal Server machine
name> and without having to use :< Terminal Server machine_name or IP>: <session number>
For eg:

Classification: Confidential
9/27/2005

Note: If you want to run 10 Vusers open 11 terminal sessions on the Load Generator
machine but in the Terminal Services manager-> Number of terminals -> 10

This feature is currently not supported by Loadrunner 8.0. To use this feature contact Mercury
Customer Support for LR80_QTP_Terminal_Server_integration patch and apply it on the
Controller machine.

You have to do the following after installing the patch in order to be able to run QTP Vusers in
the LG terminal sessions:
(1) Close the Controller. (wlrun.exe process must disappear from the task manager)
(2) Open wlrun7.ini file.
(3) Add the “VuMaxGUILimit” entry under the “Vuser”section:
[Vuser]
VuMaxGUILimit=<Max number of Vusers you want to run on this LG>
(4) Save the wlrun7.ini and close it.
(5) In the scenario open the “Vuser Limits” tab in the LG details dialog ensure that the
“GUI\WinRunner “ maximum active Vusers from 1 to the maximum number you want.

Classification: Confidential
9/27/2005

Known Limitations for LoadRunner QuickTest Professional Integration


( Also listed in QTP 6.5 \ 8.0 Readme Documentation)

• VUser does not run action iterations. LoadRunner cannot run nested action
iterations.

• The QuickTest tests which need to be run from LoadRunner should be simple,
designed to pinpoint specific operations and should avoid using external actions
and references to other external files. The external actions and the following
external resources are not supported:
Data Table files, associated library files, environment variable files, shared object
repository files, recovery files.

• Data Table methods, with the exception of DataTable.Value, are not supported in
load testing.

• The following methods are not supported: ExitAction, ExitActionIteration,


ExitGlobalIteration.

• In the Run-time Settings for script dialog box, only the General categories and sub-
categories (General, Iterations, Miscellaneous, Think Time) are relevant for
QuickTest tests.

• Automatic think time does not work. The workaround is to manually use the
Services.ThinkTime(Seconds) statement in the script.

• The Automatic Transactions option does not work with QuickTest tests.

• Corresponding StartTransaction and EndTransaction statements must be contained


within the same action.

• Always load QuickTest Professional with all installed add-ins.

• If LoadRunner VUsers and GUI VUsers enter Pending status simultaneously, one
of them fails.

• Ensure that QuickTest is closed on the load generator before running a QuickTest
Vuser from LoadRunner controller.

Classification: Confidential
9/27/2005

• When running many (approximately 15 or more) QuickTest Professional VUsers on


Citrix hosts, you must increase the default status timeout.

• Test and action parameters for top level actions are not supported. For nested
actions, the parameters work correctly
Tips and Tricks.
Q. Error; “The number is out of range” when increasing the Vuser number
limit to run GUI Vuser
R. You can only run 1 GUI Vuser per machine. If you are using the ‘Terminal Services
Manager’ setup from LoadRunner7.8 or above:
• For LoadRunner 8.0 or above:
a. Open wlrun7.ini from the Controller machine.
b. Search for the [Vuser] section
c. Add a flag "VuMaxGUILimit" with value that represents the maximum number GUI
Vuser you will run. For example, VuMaxGUILimit=10 means the maximum number
of GUI Vusers you will run per Load Generator is 10
• For LoadRunner7.8, apply Feature Pack1, then Contact Mercury Customer support for
LR78FP1P24 and the setup instruction.

Q. Error; “Process "mdrv.exe" was not created on remote host "<IP


address Reason: Communication error. Make sure the Agent process or
service is running on the remote machine.
R. Make sure that LoadRunner agent process is started on the Load Generator machine. Also,
when using the ‘Terminal Services Manger’ setup, lr_bridge runs on a different terminal than
the mdrv process(es). As such, you need to start an additional Agent (1 + the number of
LoadGenerator specified in the Controller). This can be accomplished by either launching the
Agent on the physical Citrix/MTS Server or by starting an additional Terminal Session

Q. QTP Vuser hangs in pending state while starting the scenario


R. Verify the following:
1. LoadRunner Agent is running as a process.
2. “Other Vusers” is enabled:
a. From the design tab click on the generators.
b. Select the load generator and click on details.
c. Select Vuser limits tab and check that “Other Vusers” is checked
3. Ensure that in the Controller, the option for Scenario → ‘Enable IP Spoofer’ is NOT
selected.

Classification: Confidential

You might also like