Citrix Replay Tips
Before replaying a Citrix Vuser script, consider these guidelines:
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.
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.
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.
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.
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.
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.
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.
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.)
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 Manager.
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.