Citrix Debugging Tips
When your test does not run as expected, try these debugging tips:
If you are unsuccessful in recording any Citrix actions, verify that you have only one Citrix client installed on your machine. To verify that only one client is installed, open the Add/Remove Programs dialog box from the Control Panel and make sure that there is only one entry for a Citrix client.
If replay fails, you may need to insert synchronization functions into your script to allow more time for the desired windows to come into focus. Although you can manually add a delay using lr_think_time, we recommend that you use one of the synchronization functions discussed in Citrix - Automatic Synchronization.
During recording, VuGen saves all of the agent information together with the script. By default, it also includes this information in the script, except for the ctrx_sync_on_text steps. If you encounter text synchronization issues, regenerate the script to include the text synchronization steps.
In addition, if you disabled the generation of agent information in the recording options, you can regenerate the script to include them.
To regenerate a script, select Record > Regenerate Script and select the desired options. For more information about regenerating scripts, see Regenerate a Vuser Script.
You can instruct Vusers to continue running even after encountering an error, such as not locating a matching window. You specify Continue on Error for individual steps.
This is especially useful where you know that one of two windows may open, but you are unsure of which. Both windows are legal, but only one will open.
To indicate Continue on Error:
- In the Step Navigator, right-click on the step and select Show Arguments. In the Continue on Error box, select the CONTINUE_ON_ERROR option.
- In Script view, locate the function and add CONTINUE_ON_ERROR as a final argument, before CTRX_LAST.
This option is not available for the following functions:
You can view additional replay information such as:
- the total amount of GDI handles being used
- a list of the running Citrix processes (concentr.exe, receiver.exe, wfica32.exe, wfcrun32.exe) with their PIDs and user names (if the process is not running under the LoadRunner user)
- the Citrix client name
- incompatibility warnings
To view these details, enable Extended logging in the runtime settings ( F4 Shortcut key) Log tab. You can view this information in the Output pane or in the output.txt file in the script's folder.
During recording, the bitmaps generated for the ctrx_sync_on_bitmap function are saved under the script's data folder. The bitmap name has the format of hash_value.bmp. If synchronization fails during replay, the generated bitmap is written to the script's output folder, or if you are running it in a scenario, to wherever the output files are written. You can examine the new bitmap to determine why synchronization failed.
To show Vusers during a scenario, enter the following in the Vuser command line box: -lr_citrix_vuser_view. In the Controller, open the Vuser Details dialog box and click More to expand the dialog box. Note that this will affect the scalability of the test, so this should only be done to examine a problematic Vuser's behavior.
To reduce the effect on the script's scalability, you can show the details for an individual Vuser by adding the Vuser's ID at the end of the command line: -lr_citrix_vuser_view <VuserID>.
To open multiple Vusers, place a comma-separated list of IDs after the command line. Do not use spaces, but you may use commas or dashes. For example, 1,3-5,7 would show Vusers 1,3,4,5, and 7, but would not show Vuser 2, 6, or any Vuser with an ID higher than 7.
When recording with XenApp using a Citrix and Web multi-protocol script, manual modifications may be required to ensure proper recording.