Citrix replay 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 is 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 are likely to 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 Citrix client window size for replay

Before replaying your script, you can modify the client window size using the Citrix > Configuration > Citrix client resolution runtime setting.

However, if your script contains synchronization calls, changing the resolution may introduce synchronization errors during replay, and your script may fail to run.

Recommended: Keep the default As recorded value.

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

The Bitmap polling delay option, in the runtime settings Citrix > Synchronization view, enforces a delay between polling the screen state during synchronization.

To prevent a false failure in bitmap or OCR synchronization, set the Bitmap polling delay 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 VuGen 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 Terminal 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