Citrix Replaying Tips

Before replaying a Citrix Vuser script, consider these guidelines:

Wildcards

You can use wildcards (*) in defining window names. This is especially useful where the window name may change during replay, by its suffix or prefix.

In the following example, the title of the Microsoft Internet Explorer window was modified with a wildcard.

ctrx_mouse_click(573, 61, LEFT_BUTTON, 0, 
"
Welcome to MSN.com - Microsoft Internet Explorer");ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
"
* - Microsoft Internet Explorer");

For more information, see the Function Reference.

Back to top

Run as a Process—not a Service

Since the Citrix protocol is GUI-based, it relies on several settings which are imperative for enabling interactivity. The VuGen script was recorded in an interactive session configured with specific screen settings, ClearType options, keyboard layouts, and so forth. If you run the test as a service, which by default, uses the SYSTEM account, the settings will most likely be different. Any mismatch in the above settings may result in a failed replay. Therefore, you should run the test as a process.

Back to top

Modify the window size of the Citrix client during replay

Note: Changing the Citrix client window size for replay changes the resolution as well. If your script contains synchronization calls, this may introduce synchronization errors during replay.

  1. Close VuGen.
  2. In the Citrix script folder, open default.cfg.

  3. Under the [CITRIX] section, modify the following line:

    Window=<width> x <height>

    where width and height are defined in pixels.

    For example:

    Window=1024 x 768

  4. Save the file.

Back to top

Enable Think Time

For best results, ensure that think time is enabled in the runtime settings. Think time is especially relevant before the ctrx_sync_on_window and ctrx_sync_on_bitmap functions, which require time to stabilize.

Back to top

Set Initialization Quota

To prevent overloading by multiple Vusers while connecting, set an initialization quota of 4 to 10 Vusers (depending on the capacity of the server) or apply ramp-up initialization using the Scheduler.

Back to top

Set a Bitmap Polling Delay

To prevent a false failure in bitmap synchronization, set the Bitmap polling delay in the runtime settings Citrix > Synchronization view, to a non-zero value. A recommended value is 1000 msecs.

Back to top

Use Exact Tolerance

It is recommended to always use Exact tolerance for synchronization. Set the Default Image Sync Tolerance in the runtime settings Citrix > Synchronization view, to Exact. Setting this option to Non-exact is not effective for slight changes, such as a difference in the ClearType settings.

Back to top

Set Consistency Between Machines

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, ClearType, and the other Default Options settings for the Citrix client. These settings affect the hash value of bitmaps, and inconsistencies may cause replay to fail. To view the Citrix client settings, right-click an item from the Citrix program group and select Application Set Settings or Custom Connection Settings. (Note that the remote session on the Citrix server inherits the ClearType settings of the local machine.)

Back to top

Increasing the Number of Vusers per Load Generator Machine

Load Generator machines running Citrix Vusers may be limited in the number of Vusers that can run, due to the graphic resources available to that machine, also known as the GDI. To increase the number of Vusers per machine, you can open a terminal server session on the machine to act as an additional load generator.

The GDI count is operating system-dependent. For example, the actual GDI (Graphics Device Interface) count for a heavily loaded machine using LoadRunner is approximately 7,500. The maximum available GDI on most Windows operating systems is 16,384.

For more information on creating a terminal server session, see LoadRunner Terminal Services ManagerTerminal Services Overview.

Note: By default, sessions on a terminal server use a 256-color set. If you intend to use a terminal session for load testing, make sure to record on machines with a 256-color set.

Back to top