LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesDocument Version 1.2 - 24 July 2011This article describes the most important Citrix environment and VuGen/LoadRunner configurationrequirements and settings, which if checked prior to Citrix script development, will reduce LoadRunner Citrixscript development time.This paper has specific sections addressing the configuration requirements for LR11 and as well has someinformation specific to all LR versions (LR11 and LR 9.52). See the appropriate sections herein:Basic things to check prior to Citrix script development (all LR versions)Basic things to check prior to Citrix script development (LR11 with newer Citrix features)As of the date of this document, the latest LR patch is Patch 3. HP support requires your VuGen is patched tothis (or the latest patch) in order to obtain the most current Citrix protocol bug fixes and enhancements.The LR11-specific sections in this document assume the LoadRunner user has applied Patch 3 for LR11. Thispatch is considered mandatory.Some TERMS and DEFINITIONSCitrix “NFuse” is a legacy Citrix term for the Citrix Web Interface (WI) which is the web interface to Citrixpublished applications and desktops. The term “NFuse” may be used interchangeably with the Citrix WebInterface in this and other documents to refer to the same thing.Citrix “Client” is a term to describe the Citrix ICA client-side software. LR requires the “thick” Citrix clientwhich utilizes the Citrix ICA/ICO APIs our Citrix protocol depends on. This is sometimes called the “ProgramNeighborhood Client”. Versions 11.2 of the Citrix client installer (and above) use a single wrapper aroundmultiple client-side components, so only the single client installer packager is needed. Earlier versions of theclient have separate installers, for the “thin” clients (“web client” and the “java client”), and yet another, forthe “thick” ICA client. LR cannot work with the “thin” clients, as they do not support the full ICA APIfunctionality. For versions 11.1 and below of the Citrix client, ensure only the full/thick Citrix client is used –for 11.2 and above it does not matter as the correct ICA client is installed automatically.Citrix Client software is named to match the server-side software of the same release – which is currently CitrixXenApp Server (XA). Generally Citrix provides only the most recent Citrix Client available as a free downloadfrom Citrix; for previous versions, please check with your Citrix support team.Citrix “Server” is the server-side Citrix application sharing/server software, which is an enhancement upon(and requires) Microsoft Terminal Server. Major product releases of the Citrix software have been named theCitrix Presentation Server (CPS) (Citrix 3.X and 4.X), and Citrix XenApp Server (Citrix 4.5, 5.X and 6.X).1 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesSome TERMS and DEFINITIONS - ContinuedThe term “Desktop” in Citrix terminology may be confusing. It should be noted that Citrix has a productnamed “Citrix XenDesktop”. This is a Citrix virtualization solution, and is not compatible with the current LRCitrix Protocol implementation, however, it may be considered for a future version of LR. Citrix Server“Desktops” or Windows Applications can be “published” in Citrix, and made available to remote Citrix clientmachines. It is more common to load test Citrix published applications than it is to load test publishedDesktops. Additionally, load testing published Desktops is not as robust as testing Applications due to thebackground desktop activity frequently encountered, however, both are supported by LR.The Citrix Desktop Toolbar is a Citrix add-on component, used in the newer XenApp and XenDesktopintegrations – it interfaces the Citrix WI with Citrix XenDesktop – this toolbar can cause problems whenrecording multiprotocol Citrix ICA Web scripts and can be disabled (see more information below).The LoadRunner Citrix Agent refers to an optional but recommended HP LoadRunner software componentdesigned to run on all Citrix server(s) in the Citrix enterprise hosting the applications/desktops under test byLoadRunner, and is designed to provide an additional level of object-oriented information to LoadRunnerabout the Citrix published application or desktop, so as to improve functionality and robustness, and as well itadds inbuilt synchronization allowing the state of the Citrix AUT to be more in-step with the LR script. The useof the LR Citrix Agent enables the script to recognize and synchronize with specific controls in the AUT and toget text (to get the value of text) and to provide text synchronization.“Seamless” Citrix application/desktop presentation refers to a method where (by default) Citrix server-sideapplications/desktops are presented to the client “seamlessly” – to appear indistinguishable from anapplication or remote desktop presented locally on the client, like any other local application. LR does notsupport recording in “seamless” mode (see this document below for more information).A “Citrix Session” is based on a RDP session which includes the ICA protocol, and is similar to MicrosoftRemote Desktop sessions, in that they can be configured to either terminate, or to be kept “alive” on theserver if the session should happen to be disconnected (by a network failure or intentionally). A Sessionconsumes a Citrix connection license and requires Microsoft Terminal Server licensing is in place. In so far asload testing is concerned, HP does not recommend keeping Citrix sessions alive on the server (see below formore information on this).2 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesSome TERMS and DEFINITIONS - ContinuedA Citrix “ICA file” is a text file which fully specifies how to connect to and launch a specific published Citrixapplication or desktop. In modern Citrix implementations, where applications are accessed by the Citrix WebInterface, an ICA specification is dynamically downloaded from the Citrix service to the Citrix client and then isusually automatically deleted when the Citrix session is ended.A Single-protocol Citrix ICA script refers to the most basic Citrix script type LR supports, whereby with the helpof the Citrix ICA client, the application server is directly accessed, and applications/desktops identified andlaunched, either by “browsing” for them, or a specific Citrix Application or Desktop is accessed through theuse of the “ICA file” described earlier. Citrix has designed the newer versions of Citrix to be fully Webenabled, which is to use the Web Interface instead of the ICA method; however, there are many ICAapplications in use globally, so it is not anticipated that support for the ICA protocol will be ended anytimesoon – rather, the use of the ICA APIs may be hidden under the Web interface.A Multi-protocol Citrix ICA Web script refers to a Citrix script that is based on accessing the application fromthe Citrix Web Interface. This is the most common type of LR Citrix script; however there are a few morethings to check to avoid recording problems (see below for more information).The LR Citrix Registry Patch (known hereafter as the “registry patch”) is a Windows registry patch file that isrequired in v10 and above of the Citrix Client -- in order that the LR Citrix ICA protocol properly communicatewith the Citrix server; it enables Citrix “Virtual Channels” for communication. This patch is not bundled withLR 9.5X, but is bundled and is automatically installed with LR 11 starting with LR11 Patch 1; however, in somecases, the registry patch may not be auto-installed (due to some environments where OS/system securitypolicies are in effect preventing registry edits) – therefore it is recommended to manually install it prior torecording (installation is performed by double clicking the registry file).3 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (all LR versions)Ensure you have a well defined business process you will record in advance and have run through this outsideof VuGen recording. As well, ensure you understand the salient characteristics of the AUT, including failuremodes, average, minimum and maximum response time under all conditions.Make friends with your Citrix administrators if possible as you will likely need to ask for their assistance,especially for installing and upgrading the LR Citrix Agent and for other Citrix load testing issues.Try to load test Citrix applications which are restricted (contained) to a few Citrix servers in a Citrixdevelopment/test “farm” rather than to load test in a live Citrix production environment. The LR Citrixprotocols can work with any supported Citrix implementation; however it’s always helpful to reduce the sizeof the test environment.Confirm basic Citrix and LR compatibility. It will save time to in advance confirm the Citrix components inyour environment are fully supported by the version of LR/VuGen you are using.LR 11 Patch 3 currently supports:Citrix Server on Microsoft Windows, up to XenApp version 6, Citrix ICA Client, versions 9.1 and up to 12.1 issupported. LR11 Patch 3 and above will more easily adapt to Citrix XenApp client changes above 12.1 due toLR improvements in LR11 Patch 2 and above.LR 9.52 (9.5 SP1, SP2) currently supports:Citrix Server on Microsoft Windows, up to XenApp 5 with LR 9.5 (and Web Interface 5.1) and up to XenApp11.0 full client (termed XenApp Plug-in for hosted applications) -- however for load testing XenApp server andclient technology, upgrading to LR/VuGen 11 Patch 3 is strongly advised.IMPORTANT NOTE ON COMPATIBILITY – See the Product Availability Matrix (Product Support Matrix)available in Software Support Online for the most current list of compatible rt matrices.jspWhen should the LR Citrix Agent be used? The most useful application for the LR Citrix Agent is the textgetting (reading) function since it cannot be done without the agent. Installing and using the LR Citrix Agentrequires that the Citrix server(s) the agent is being installed/used on has Microsoft DEP fully disabled.Additional benefits of the LR Citrix Agent include “object oriented” access to the AUT, and textsynchronization, although the latter can be done by legacy LR Citrix API calls (for example the functionctrx sync on bitmap).4 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (all LR versions) - ContinuedWill you be using the LR Citrix Agent to do text trapping/syncing? There is a limitation as of LR11 Patch 3, inthat text trapping/syncing does not work for 64-bit based applications published in Citrix server running onWindows 2008 server (by default “R2” version of W2K8 server is 64-bit) – however, this should not be aproblem for 32-bit Citrix published applications running on 64 bit W2K8 (in 32-bit emulation mode) or for 32bit native applications on 32-bit W2K8 Citrix server. Note that many applications are not 64-bit nativeWindows applications so this may not be a problem (check with your Citrix administrators to be sure).If something proves difficult recording Citrix app as it is launch from the Citrix Web Interface, can you fall backto using a single protocol ICA script to loadtest the Citrix ICA part, avoiding the web part, either for a solutionor at least for a workaround? It is a good idea to think about this contingency at least until you havecharacterized your Citrix testing environment.Do not leave disconnected Citrix sessions on the Citrix server – terminate them after a short timeout intervalinstead. Ask your Citrix administrators to confirm that the Citrix ICA sessions are configured to not remainalive on the Citrix servers if they are disconnected, rather, that they configure the sessions such that they are“terminated” (exited) when the session disconnects, either intentionally or by network failure, etc. It is wiseto set the timeout for disconnected sessions short, such that they are terminated after a minimum amount oftime rather than kept alive for minutes. Following the above will help insure your Citrix loadtest starts with anew Citrix session each time, and that you are not re-connecting to a disconnected session, where the state ofthe application is in whatever previous state it was when it was disconnected (as it is nearly impossible tosynchronize back to a disconnected session – it will most likely fail).A simple test for disconnected sessions is to launch a Citrix app outside of VuGen, let’s say Word. Open adocument, do something in it. Click “X” on the session container window, to close the session (without savingthe document and exiting normally). Now, launch the same application again – are you reconnected to thesame application in the same state as you disconnected from before? This should be avoided.5 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (all LR versions) - ContinuedMultiple sessions per user/client -- ensure if you are going to run more than one Citrix VUser on a generator(which is usually the case) that your Citrix administrators have not restricted the Citrix server to restrict eachuser to have only one Citrix session available. A simple test for this is to launch the application outside ofVuGen a second and third time, to confirm it is possible.For Web Interface launched scripts, confirm Microsoft DEP is fully disabled on the VuGen machine prior torecording. This is accomplished a variety of ways depending on the OS version, but in summary, for WindowsXP/2003 server, you must have “NoExecute AlwaysOff” in C:\boot.ini (you can use the System applet –Advanced – Startup and Shutdown, “Edit” function to change this file. Then reboot.For Vista, Windows 7 and W2K8, you can run the following from the cmd shell:bcdedit.exe/set nx AlwaysOff (REBOOT NOW)If at all possible, disable Anti-Malware and security software, as it may think LR’s Web recording engine iscompromising IE or the system security and block our recording of the web part of the script. At a minimum,see if an exception rule can be added to ignore vugen.exe, runcitrixclient.exe (LR processes), and wfica32.exe(Citrix’s client process) or better yet, a rule to ignore blocking LR\* files altogether.6 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (all LR versions) - ContinuedConfirm the Citrix application can launch outside of VuGen recording (and prior to recording) -- and that itappears in non-Seamless mode.Prior to the recording, and after logging into the Citrix Web Interface (for a Citrix Web multi script), configurethe Session settings to “no preference” per the screen shot below. This setting should persist across Citrixsessions for the same user.To confirm seamless is disabled, when you then launch the Citrix application, it should not appear without aCitrix “container” window – that is it should appear within a Citrix ICA window, not like a local applicationwould appear on your desktop. If your Citrix AUT cannot launch in non-seamless mode, due to companysecurity policies, LR cannot be used to loadtest this application.NOTE: For a single-protocol ICA script or for multi-protocol Citrix ICA Web scripts, setting the Window size to“no preference” is mandatory.7 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (all LR versions) - ContinuedConfirm the LR Citrix Registry Patch is installed just prior to recordingAfter either the Citrix Client is installed or upgraded (Citrix Clients 10.X and above), or after LR/VuGen isinstalled or a LR/VuGen patch is added, re-install the LR Citrix Registry patch by double clicking on it.LR 9.5 -- Citrix Registry Patch LR 00671 is available by a ument/KM104660LR 11 – The Citrix Registry Patch specific to LR11, is in the product folder, in LR\dat\Enable Citrix API.reg.NOTE: it is suggested in a new or dynamic environment where product patches and Citrix clients are beingupgraded/installed, to (re)install the Citrix registry patch right before initially recording; to be sure it’s installedas this is a very common reason for Citrix script recording issues.NOTE: also note that the Citrix Registry patch must be applied on the generators which will run the CitrixVUsers as well!When recording against XenApp 5 (9.52 LR) or XenApp 5 or 6 (LR 11 Patch 3), prior to recording, in therecording options, enable “explicit URLs only” option in an HTML level script, to help the correlation rules:Note: LR11 Patch 3 is the recommended version to use for XenApp technology, however as previouslymentioned, LR 9.52 should work for up to XenApp 5.0. The above helps with the SessionToken correlation rulewe provide with LR11. If you are using LR 9.52 with XenApp 5, see the following KB for a manual ve/document/KM8913968 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (all LR versions) - ContinuedICA Client File SecurityThe dialog below may be presented in certain conditions and should be acknowledged after setting thecheckboxes below in order that it does not re-appear during a loadtest:The above modal dialog can lead to VUsers being blocked prior to the Citrix application launch. You can checkif this is a problem by looking into LG console session running on the Load Generator machine where theVUser runs (see HP KB KM817459 which describes howto enable the display of the Citrix Session in a LR or Performance Center loadtestThis also can be worked around with custom WebICA.ini (see ation doesn’t launch during recording in a multi-protocol Web Citrix ICA script whereas it does with asingle-protocol ICA script and it launches outside of VuGen recording.This may be caused by a third party security software or some other local issue blocking the Web portion ofthe recording. See the HP KB KM8163179 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (LR11 with newer Citrix features)IPv6 is not supported and must be disabled:A symptom of IPv6 being enabled may be the following recording log message:If you still see errors after disabling IPv6, try disabling the “IP Helper” Windows Service.10 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (LR11 with newer Citrix features) (continued)For recording Citrix Web Interface based apps (multi protocol Citrix Web) and using IE8, the IE SmartScreenFilter must be disabled prior to recording:11 Copyright 1993 - 2011 Hewlett-Packard Development Company, L.P.
LoadRunner Citrix Scripts -- How to Avoid Citrix IssuesBasic things to check prior to Citrix script development (LR11 with newer Citrix features) (continued)Enable the XenApp correlation rules for multi-protocol Citrix Web Interface-based applications prior torecording, to capture a