In this article, I will cover the following:
- Remotely managing hung Citrix sessions
- Managing ‘Loadrunner Time out’ related failures
- Handling windows that open during script execution
Remotely managing hung Citrix sessions
While debugging script-issues, one has to stop or restart the script execution abruptly which causes some sessions on the Citrix server to exist in open state – ‘hung sessions’. These ‘hung sessions’ can be terminated at the server, however a performance engineer may not know the required commands and configuration settings on Citrix servers.
A method a performance tester can use to achieve this is to create a batch file and run it through command prompt to reset the server sessions. This is a faster approach compared to the one in which sessions are terminated at Citrix servers by changing configuration settings.
The following two commands are required for this operation -
Server admin privileges are required to perform these commands. The batch file will have a separate command for every server.
Example: In case of 2 presentation servers named Server1 and Server2 the batch file looks like -
for /f "tokens=2" %%i in ('qwinsta /server:Server1 ^| find /i "ica-tcp#"') do echo y | rwinsta /server:Server1 %%i for /f "tokens=2" %%i in ('qwinsta /server:Server2 ^| find /i "ica-tcp#"') do echo y | rwinsta /server:Server2 %%i
Managing ‘Loadrunner Time-out’ related failures
Some business processes take longer than expected time-duration to respond. Huge data-related transactions, Video-streaming transactions are some examples of such processes. During script execution such transactions fail throwing ‘timeout error’. The resolution of this issue is simple. In the Vugen run time settings, you need to increase the value of ‘Waiting time’ parameter. This change will allow the script to wait on each step longer without throwing ‘timeout failure’.
If you wish to set the higher waiting time only for a limited number of transactions, you can use ctrx_set_waiting_time function before and after the transactions that need additional wait time.
The function is
ctrx_set_waiting_time ( long waitTime );
Handling windows that open during script execution
During script execution some unexpected windows may open/appear in the business flow and cause the vuser to stop script execution unexpected. ‘Warning messages’ or ‘pop-ups’ are examples of such windows. The ctrx_execute_on_window function in the script handles such windows and manages effective script execution.
The function is:
ctrx_execute_on_window (char *window_name, long handler);
Eg – Let’s consider a business situation in which application loses connectivity and application sends a popup window that allows the user to click on a button to reconnect. If the ctrx_execute_on_window function is used, the script will automatically recognise the window that opens up and executes the required step (clicking ‘reconnect’ button). This means that you do not have to put in conditional logic for this scenario (‘Clicking on reconnect’) happening within the performance script.