Set up your Citrix environment

Before creating a Citrix script, you need to properly configure your Citrix client and server. You also have the option to install the Citrix agent.

Configure the Citrix client and server

Configure the Citrix client and server before creating a Citrix script.

To configure your Citrix client and server:

  1. Prerequisite:

    • Citrix installed on the local network. Ensure that you are working with supported versions of your Citrix client and server, as listed in the Support Matrix.

    • Citrix server installed on the cloud. Ensure you have an active Citrix cloud (DaaS) environment, using services installed on Microsoft Azure, with working communications via the VDA installed on your VM.

  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 and 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, if connecting to Citrix server via Web Interface.

    If you are using Citrix XenApp or XenDesktop 7.x or later, use Citrix multi-protocol with web Vusers, and connect to Citrix server via Citrix Web Interface.

    1. DEP. Before recording, Turn off Microsoft DEP on the VuGen machine. This is done in different ways on different operating systems.
      For example, for Windows 10:

      1. From the cmd shell, run bcdedit.exe /set {current} 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 VuGen process) and wfica32.exe (the Citrix client process). Otherwise, your security software may suspect VuGen's web recording engine and prevent VuGen 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: https://support.citrix.com/article/CTX138928. (Relevant only for published desktops, not published applications)

    4. Internet Explorer Settings.

      1. When working with IE 11 or later, ensure that the Windows SmartScreen filter is disabled (IE Settings > Safety > Turn off SmartScreen Filter) .
      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 2016 server, you set this option from the Server Manager, using Local server > IE Enhanced Security Configuration.

    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.

    VuGen can create Citrix scripts in non-seamless mode only (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.

Back to top

Install the Citrix agent (optional)

The 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 Citrix agent.

You install the agent on all machines that deliver the Citrix application, including the Citrix server and remote machines as relevant.

To install the Citrix agent:

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

  2. Make sure that wfapi.dll is installed on the machine.

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

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

  6. Follow the installation wizard to completion.

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

    • After installation, the agent is active only for LoadRunner Professional invoked Citrix sessions—it is not active for Citrix sessions started without LoadRunner Professional.
    • To uninstall the Citrix agent, in the Windows Start menu, open Add or remove programs, select the Citrix agent from the list, and click Uninstall.

    • The Citrix agent was designed to be cross-compatible, allowing you to use one version of LoadRunner Professional and yet another version of the agent. It is recommended that you use the most recent version of the agent.
    • The agent is not supported when working with a Citrix cloud environment, using services installed on Microsoft Azure.

Back to top