Set Up Your Citrix Environment

Before creating a Citrix script, you need to properly configure your Citrix client and server.

  1. Prerequisite: Ensure that you are working with supported versions of your Citrix client and server as listed in the System Requirements.

  2. Set up your Citrix ICA clients.

    1. Install the client on the VuGen and Load Generator machines. To run your script, you must install a Citrix client on the VuGen machine each Load Generator machine. If you do not have a client installed, you can download one from the Citrix website under the Downloads section.

    2. Verify the required VuGen Citrix settings. For some Citrix versions, the TCP/IP Citrix connection option does not work.  In that case, use the TCP/IP+HTTP Citrix connection option:

      In the VuGen Recording Options dialog box, select Citrix > Login. In the Connection area, select TCP/IP+HTTP as the Network Protocol. For more details, see Citrix > Login Recording Options.

  3. Set up your Citrix Web Interface clients. (Only when connecting to Citrix server via Web Interface)

    1. DEP. Before recording, Turn off Microsoft DEP on the VuGen machine. This is done in different ways on different operating systems.
      One way to do this on Vista, Windows 7, and Windows 2008 is as follows:

      1. From the cmd shell, run bcdedit.exe/set nx AlwaysOff.
      2. Restart the computer.
    2. Security Software. If possible, disable anti-malware and other security or antivirus software. Alternatively, add an exception to ignore vugen.exe, runcitrixclient.exe (a LoadRunner process) and wfica32.exe (the Citrix client process). Otherwise, your security software may suspect LoadRunner's Web recording engine and prevent LoadRunner from launching your application.

    3. Disable the desktop toolbar. The Citrix administrator should disable the desktop toolbar. There are several ways to do this. Add ConnectionBar=0 to the default.ica file, or follow the method described in: (Relevant only for published desktops, not published applications)

    4. Internet Explorer Settings.

      1. When working with Internet Explorer 8 or later, ensure that the Enable SmartScreen Filter option (Internet Options > Advanced) is not selected.
      2. When recording on the Citrix Web Interface from a Windows server operating system, Internet Explorer Enhanced Security (IE ESC) must be disabled. This option is set in different locations in different operating systems.

        For example, in Windows 2008 server, you set this option from the Server Manager, using the Configure IE ESC option.

    5. VuGen Settings.

      1. Make sure that VuGen is set to create scripts containing only explicit URLs.

        In the VuGen Recording Options dialog box, select General > Recording and click the HTML Advanced button. In the Script type area, select: A script containing explicit URLs only.

      2. Enable the Citrix server SessionToken correlation rules: 

        In the VuGen Recording Options dialog box, select Correlations > Rules, expand the Citrix_XenApp node and select the relevant token option for the Citrix version you are using. (If you are not sure which option to select, you can select all of them.)

  4. Set your Citrix client to work in non-seamless mode.

    LoadRunner can create Citrix scripts only in non-seamless mode (client opens within a Citrix ICA window and not as a local application).

    In the Citrix client, select Preferences > Session Settings and set Window size to No preference. This setting is saved across Citrix settings for the same user. Alternatively , add TWIMode=Off in the default.ica file on the server.

  5. Configure the Citrix server.

    1. Session Disconnect. By default, when a client times out or disconnects from the Citrix server, the session remains open for a defined time period. However, beginning a run in a Citrix session that has an unpredictable state can cause your test to fail.

      Therefore, the Citrix server administrator should configure the Citrix server to end (reset) the client session when a client disconnects for any reason.

    2. Multi-Session Support. If you are going to run more than one Citrix Vuser on a load generator, ensure that the Citrix server is configured to enable multiple sessions per user/client.

  6. Install the LoadRunner Citrix agent on the Citrix server. (Optional)

    The LoadRunner Citrix Agent provides an additional level of object-oriented information about the Citrix published application or desktop that enables you to improve the functionality and robustness of your Citrix script. It also provides some extra enhancements over the normal Citrix functionality. For details, see Agent for Citrix Presentation Server - Overview.

    1. If you are upgrading the agent, make sure to uninstall the previous version before installing the next one.

    2. If your Citrix server requires administrator permissions to install software, log in as an administrator to the server.

    3. Ensure that Microsoft DEP is fully disabled.  (DEP must be disabled when using the agent.)
    4. Locate the installation file, SetupCitrixAgent.exe, on your installation disk in the Additional Components\Agent for Citrix Server folder.

    5. Follow the installation wizard to completion.

    6. To enable logging for the agent, set DebugEnabled=1 in the [General] section of CtrxAgent.ini file. The log file will be created in either the Agent’s bin\ folder or in session’s %TEMP% folder, depending on user permissions.
    7. Note:  

      • After installation, the agent will be active only for LoadRunner invoked Citrix sessions—it will not be active Citrix sessions started without LoadRunner.
      • To uninstall, from Add or remove a program, remove Software Agent for Microsoft Terminal Server.

      • The Citrix agent was designed to be cross-compatible, allowing you to use one version of LoadRunner and yet another version of the agent. It is recommended that you use the most recent version of the agent.

Back to top