5/31/04
LOADRUNNER CITRIX TIPS & TRICKS
Requirement
For LoadRunner 7.8 FP1 or higher:
For LoadRunner 7.6 and 7.8:
For LoadRunner 7.51
How to find out the current Citrix server version
Which Citrix MetaFrame versions does LoadRunner support
Which Citrix client type does LoadRunner support?
Common Problems
Record
Replay
Bitmap Sync Information
256-Colors settings
Windows Terminal
Citrix functions – additional information
Common Practice
Requirements for the Citrix Monitor
New Features of LoadRunner 8.0 / LoadRunner 7.8 FP1
New Features
FAQ
Requirement
Recording against Citrix ICA client is supported starting with LoadRunner 7.51.
For LoadRunner 7.8 FP1 or higher:
The CitrixVuser type is supported out of the box. With this version, you can use the regular Citrix ICA client; there is no need to install the Citrix client provided by Mercury anymore. You can download the latest version of Citrix from the Downloads section on the Citrix website
Note: Citrix client versions 7.0, 8.0, and lower than 6.3 are not supported. Citrix client version 9.23 is only supported on LoadRunner 8.1 FP4 with patch LR81P184 installed. This patch can be downloaded from the patches database on the Mercury Support website.
For LoadRunner 7.6 and 7.8:
The CitrixVuser type is supported out of the box. However, you need to go to the add-ins Citrix Client folder on the CD to install the Citrix client.
For LoadRunner 7.51
- Install LoadRunner 7.51 and apply the liveupdate (SP1)
- Install Citrix_ICA_Add-in.exe patch from LoadRunner’s patches database under LoadRunner LR7.51SP1 Citrix LR751SP1P1
- Install Citrix client (6.30.1060.zip) and Citrix_patch_27.exe from LoadRunner’s patches database under LoadRunner LR7.51SP1 Citrix LR751SP1P27
How to find out the current Citrix server version
From the Citrix Connection Configuration, click on Help About… It should mention somewhere in the window the current MetaFrame server version and any SP or FR applied. To get to ‘Citrix Connection Configuration’,
- For MetaFrameXP: Click on Start Programs CitrixMetaFrameXPCitrix Connection Configuration.
- For MetaFrame 1.8: Click on Start Programs MetaFrame Tools Citrix Connection Configuration.
Which CitrixMetaFrameversions does LoadRunner support
LoadRunner supports both MetaFrame XP ,1.8 and MetaFrame Presentation Server 3.0:
- For MetaFrameXP, all versions (a, e and s) are supported. You must have at least Feature Release 1 (FR1) applied on top of MetaFrameXP in order for LoadRunner to support your environment. CitrixMetaFrameXP comes in three flavors:
- XPs - Standard Edition - Designed for departments or workgroups
- XPa - Advance Edition - Designed for medium businesses
- XPe - Enterprise Edition - Designed for the enterprise business
FR = Feature Release. This is basically a service pack, which is used to correct current problems and new product features that were unavailable before.
- For MetaFrame 1.8, you must have SP3 applied on top of it in order for LoadRunner to support your environment.
- As of 8.1, LoadRunner has support to test against Citrix Presentation Server 4
Which Citrix client type does LoadRunner support?
LoadRunner supports the Win32 ICA client and the Nfuse client. You can use the regular client (preferably 7.1 or higher) with LoadRunner7.8 Feature Pack 1 or higher.
Refer to the ‘Requirement’ section for further information.
Note: Citrix client versions 7.0, 8.0, and lower than 6.3 are not supported. Citrix client version 9.23 is only supported on LoadRunner 8.1 FP4 with patch LR81P184 installed. This patch can be downloaded from the patches database on the Mercury Support website.
.
As of current, LoadRunner does not support the ICA Java client or the Web client. Since the communication between the Java client and the Windows client is identical, using the Windows client will simulate the same load on the server.
Common Problems
Record
- When recording against a CitrixNfuse website using Multi-Protocol, after clicking on the published application icon to create a connection to the Citrix server, an SSL Certificate Error appeared.
- To get past the errors please do the following:
- In the port-mapping tab, delete the current entry for port 443 and add the following 2 entries as shown:
b.The port-mapping tab should look like the following after both entries are entered. Be sure to UNCHECK the entry for the Citrix server.
c. Record a new script and the error should not occur again.
Q.During recording, there is a window titled “ICA Seamless Host Agent” that pops up. When manually logging into the application there is no such popup.
- This popup is a result of the mode that VuGen is recording in. The Citrix solution requires that LoadRunner record in this mode. This is an informative window popup and not an error. To work around it, simply click on OK and it will go away.
- During recording, VuGen launches the Citrix ICA client but NOTHING is recorded.
- This is obsolete with LoadRunner 7.8 FP1 or higher
For lower version, this happens when you have your own Citrix client installed on the recording box in addition to Mercury’s. Go to the Control Panel and uninstall ALL PREVIOUS Citrix ICA and Citrix Web clients on the box PRIOR to installing Mercury’s. There is no need to do this if you have LR 7.8 FP1 or higher.
Q. VuGen cannot launch the Citrix ICA client during a Citrix recording. When launching the application, the following error pops-up
R.This is obsolete with LoadRunner 7.8 FP1 or higher.
For lower version, you will get this error if you are recording against your own Citrix client instead of LoadRunner’s Citrix client (runDlg.exe) thru VuGen. The solution is to specify the path to <LoadRunner>\bin\runDlg.exe in the Program to record field, and have <LoadRunner>\bin in the Working directory.
- Internet Explorer disappears during a Multi protocol Nfuse recording as soon as the Citrix ICA client is launched.
- Check to see if the machine has been set up to record against multiple processes. Go to the registry editor to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs
and check to see if it’s pointing to bbhook.dll. If it is then remove the entry and then reboot the machine.
Q.Internet Explorer disappears or crashes during a Multi protocol Nfuse recording as soon as the browser is launched.
R.Check to see if the machine has any Anti-Virus software running. Try shutting down the Anti-Virus services. If you have McAfee Anti-Virus installed, shut down the following services:
- AVSyncManager
- McShield
If you have Norton Anti-Virus installed, shut down the Norton Antivirus service from the services menu.
For Windows 2000 machine, go to Start Settings Control Panel Administrative Tools Services.
For Windows NT machine, go to Start Settings Control Panel Services.
Q.The Citrix ICA client window is minimized after it is launched during recording. Clicking on the icon on the taskbar does not bring it up.
R.Right click on the Citrix ICA Client icon on the taskbar and select maximize. This will bring the client back to the restored view. Adjust the window size as necessary. Do not minimize the Citrix ICA Client window during replay, as this will cause the same problem to occur again.
Q.The Recording Options in VuGen is NOT reflecting the changes being made in it. The user changes the information, clicks on OK, but when going back to the Recording Options the information is still not changed.
R.Click on the “Use Defaults” button to clear the information and then re-enter it again. Or, you can go to the <LoadRunner>\dat directory and look for citrix_ro.ini. This file contains information from the Recording Options. Make sure the changes are being reflected here.
- Recording against a drop down menu does not work. During replay it fails on the ctrx_mouse_click when it is supposed to select an item from the drop down.
- Use arrow keys instead of mouse click to select an item from the drop down during recording.
- When performing bitmap sync during recording, the following error pops up:
- Make sure that you are not connecting to another Citrix server within the first Citrix session. If this is true, then the hashing mechanism will not work and you will see an error. This is because an ICA session cannot create an OffScreen surface when embedded in another ICA session. It is this OffScreen mechanism that allows the Screen Capture/hashing functionality
Q. When recording a Citrix ICA script, only 3 events are recorded. Afterwards, mouse click movements are not being recorded. When logging off, the server gets the following error:
R.This can happen when the OS that LoadRunner’s installed on is NT 4.0 SP6. Please connect to the Citrix server without VuGen first and then try recording in VuGen again.
- Upon login, the user is getting a popup window indicating the user is using an older version of the Citrix client.
- 1. Log into the Citrix server as a user with administrative privileges.
2. Clicks on Start Programs Citrix MetaFrameXP ICA Client Update Configuration.
3. The ICA Client Update Configuration window should come up showing you a list of Citrix ICA clients installed on the server.
4. Right click on the Citrix ICA Win32 Client icon that the server is giving users
popup messages for, and select Properties.
5. In the Description tab, uncheck the box that says, "Enabled" and then click on Apply. Please see screen shot below.
- During recording, user recorded bitmap sync. User then opened the <hash value>.bmp file in the <script directory>\data folder. The bitmap does not look the same as the one taken during recording.
- Sometimes when you use 256-colors setting, the recorded bitmaps in the script's data directory does not have the same color as you saw during recording. This should not matter as long as the bitmap hash value stays the same during replay. For further information, refer to the Bitmap Sync Information section.
Replay
- Replay of a Multiprotocol CitrixNfuse script is failing on ctrx_nfuse_connect_server with the following error:
vuser_init.c(x): Saving Parameter "Param1 = <head<title>Object moved</title</head>\n
<body<h1>Object Moved</h1>This object may be found
<a HREF="logout.asp?sessionExpired=On">here</a>.</body>\n \r\n
<HTML>\r\n <HEAD>\r\n
<SCRIPT Language="JavaScript" type="text/javascript">\r\n
<!--\r\n top.location = 'login.asp?NFuse_loginErrorId=On';\r\n //-->\r\n
</SCRIPT>\r\n </HEAD>\r\n </HTML>\r\n "
vuser_init.c(x): t=xxms : Request done "
vuser_init.c(x): web_url was successful, xx body bytes, xx header bytes
vuser_init.c(xx): Waiting for event ...
vuser_init.c(xx): Error Connect can not be established - Last Error=70, Last client error=1030
- Check that the nfuse_1.ica file is successfully created in the script directory during replay. The contents of the ICA file should look similar to the following (HINT: Open in Notepad or else it will try to connect to the server!):
If the file contains something else then you can do the following:
1.Check that the cookie and header information is handled properly in all the web requests prior to the ctrx_nfuse_connect statement. It may be necessary to manually add some web_add_header or web_add_cookie statements. An easier approach is to record a single protocol web script up to the point where the published application is launched. Stop the recording, copy the web requests recorded and paste it above the ctrx_xxx functions in the Multi protocol script. You need to comment or delete the original web requests that are recorded above the ctrx_xxx functions.
2.Check to see if NFuse_UID is recorded inside the ctrx_nfuse_connect statement. If it is then you need to correlate it. Below is an example of the correlation:
web_reg_save_param("NFuse_UID", "LB=NFuse_UID=", "RB=&NFuse_App", LAST);
web_url("Word",
"URL=
"Resource=0", "RecContentType=application/x-ica",
"Referer=
"Mode=HTTP", LAST);
ctrx_nfuse_connect("<NFuse_UID>&NFuse_Application=Word&NFuse_MIMEExtension=.ica");
- If none of the solutions above apply, then be sure that you are NOT clicking inside the Citrix ICA Client window (shown below) while VuGen is executing the web_url requests (prior to the Citrix steps). This will cause the client to connect to the Citrix server, and by the time VuGen gets to the ctrx_nfuse_connect function it will throw an error.
4.During replay LoadRunner takes the first response from the server and saves the body into the file nfuse_(null).ica located inside the script directory. We then parse thru this file and connect to the server specified. If the first response from the server is a redirect, then it will fail during replay. As a workaround, you need to manually correlate the dynamic .ica file. Below is an example of how to do so.
int fp;
char * icafile;
web_cleanup_cookies();
web_set_max_html_param_len("4096");
web_reg_save_param("icadata", "LB=WFClient", “RB=", LAST);
web_url("Default.asp",
"URL=
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
icafile = (char *)malloc(strlen(lr_eval_string("<icadata>")) + 100);
sprintf(icafile,"[WFClient%s",lr_eval_string("<icadata>"));
fp = fopen("C:\\temp\\icafile.ica", "w");
fprintf(fp, icafile);
fclose(fp);
ctrx_set_connect_opt(ICAFILE,"C:\\temp\\icafile.ica");
//ctrx_nfuse_connect(…);
Q.Some of the CitrixVusers are failing in the Controller/Tuning Console. Is there a way to show the Citrix client during replay?
R.Use the –lr_citrix_vuser_view command line:
For Controller,
- Go to the Design view, click on Details More.
- In the field where it says “Command line”, enter –lr_citrix_vuser_view. This will bring up a Citrix client on the load generator box for each running vuser. This is ONLY recommended for debugging purposes, as bringing up a client for each Vuser will consume additional resources on the load generator box.
For Tuning Console,
- Right mouse click on the script, and select ‘Script Details…’ ,
- Under the Parameters tab, enter lr_citrix_vuser_view as a parameter name, and 1 as the parameter value
- The ctrx_sync_on_bitmap function replays fine on the recording machine but fails during replay on another machine.
- If you intend to replay the script on another machine, make sure that the following items are consistent between the record and replay machines: Window Size (resolution), Window Colors, System Font and the other Default Options settings on the desktop. These setting affect the hash value of bitmaps and inconsistencies may cause replay to fail. For more information, refer to Bitmap Sync Information section.
Q.How to increase the number of CitrixVusers that can be executed on each Load Generator machine.
R.Machines running CitrixVusers may be limited in the number of Vusers that can run, due to the graphic (GDI) resources available on that machine. To increase the number of Vusers, open multiple Terminal Server sessions to the load generator machine and relate each terminal server session to the load generator. This means a Terminal Server must be running on the load generator. Windows 2000 Server and Advanced Server both come with Terminal Server. If you are not using one of these OS then please contact Microsoft on how to purchase Terminal Server separately. Please follow the instructions below:
NOTE: Any ctrx_sync_on_bitmap that is recorded using a non-256 color setting will fail on replay on a terminal session. For further information, refer to Bitmap Sync Information section.
- Set the ‘CitrixIsActive’ option:
- For LoadRunner7.8 or above:
On each load generator box, go to Start Programs LoadRunner Advanced Setting Agent Configuration, and enable the checkbox for ‘Enable Terminal Services’
- For LoadRunner7.6 or below:
On each load generator box, 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.
2.From any computer that has the Terminal Services Client installed, create at least two connections to the load generator. If the load generator has Terminal Services Client installed, then create a connection to itself. Then, startup the LoadRunner Agent Process in each Terminal Server Session.
3.From the Controller/Tuning Console, define your load generators using the following convention:
<machine_name or IP>:1
<machine_name or IP>:2
<machine_name or IP>:3
You need to define one load generator in the Controller/Tuning Console for each terminal server session that you have created. The above example is for 3 terminal server connections to the load generator.
NOTE:Unfortunately, there is no sure way to tell how many CitrixVusers each terminal session can support. The recommended number of CitrixVusers to run per session is 40. You may need to experiment with ramping up Vusers on each load generator until the graphic resource is exhausted (i.e. by looking at the terminal session you just created, the screen refresh is not optimal). Another way to check if GDI resource is being exhausted is by looking at the Task Manager. Launch the Task Manager and go to View Select Columns Check GDI Objects.
Note: There is a third party utility, TaskInfo 2003 that allows you to monitor the GDI resources. For more information, please refer toTaskInfo 2003 Home Page.
4.Test and make sure you can connect and run 1 Vuser on each load generator before running the full load test.
NOTE:If your script contains ctrx_sync_on_bitmap functions that were recorded on a desktop that has a non-256 colors setting (such as 16-bit or 32-bit), the function will fail on replay through the terminal session. For further information, refer to the Bitmap Sync Information section.
Below is a schematic diagram of the overall architecture of a Citrix load test.
Q.ctrx_sync_on_bitmap function failed during replay.
R.Check that the bitmap taken during recording is not dynamic. If it is, then change the function from ctrx_sync_on_bitmap to ctrx_sync_on_bitmap_change. Follow the example and syntax given in the function reference.