This article is about highlight some Points to consider while recording .Also mentioned about common issue that we face during recording and solution for that issue.
- Citrix Vuser scripts simulate the Citrix ICA protocol communication between a Citrix client and the server. VuGen records all activities during the communication and generates a Vuser script.
- A Citrix VUser’s memory footprint is two to three times a Web VUser’s memory footprint.
- In tree-like structures, while recording, expand each child item to display sub-item in order to emulate the playback effectively.
- Citix transactions, citrix windows and bitmap functions in LoadRunner take time to stabilize and hence we must not ignore think time when replaying the script.
- Use the keyboard as often as possible, avoid using mouse clicks:
1. Prefer Keboard recording tha mouse clicks:
When recording use keystrokes as often as possible (in preference to mouse clicks). This makes scripting more reliable and means you have less scripting and debugging issues. The LR functions recorded with key strokes and mouse clicks are –
Key Stroke
ctrx_key(“RIGHT_ARROW_KEY”, 0);
ctrx_key(“RIGHT_ARROW_KEY”, 0);
Mouse Clickctrx_mouse_click(256, 46, RIGHT_BUTTON, 0, ‘Submit’);
Similarly, while selecting data entry items it is better to use keystokes e.g. The ‘up’ and ‘down’ arrow keys to select appropriate item. Less LR script debugging issues are observed.
2. Windows settings with Vugen, Controller and LoadGenerator machines -
The Window Size (resolution), Window Colors settings, System Font and the other Default Options for all the VUgen, controller and prosolution pills cream and volume pills pakage LoadGenerator machines should be same. In LoadRunner, these settings affect the hash value of bitmaps. This may result in issues with bitmap sync functions and such inconsistencies may cause script replay to fail. To view the Citrix Client settings, select an item from the Citrix program group and choose ‘Application Set Settings’ or ‘Custom connection settings’ from the right-click tab menu. Select ‘Default Options’.
Using same login id for multiple virtual-users in a load test -
During a load test a limited number of login ids may be available. In such cases, login ids have to be reused on the system to create required load. To make sure that this happens smoothly the following changes need to be made in Access Management Console on Citrix presentation server:
Using same login id for multiple virtual-users in a load test -
During a load test a limited number of login ids may be available. In such cases, login ids have to be reused on the system to create required load. To make sure that this happens smoothly the following changes need to be made in Access Management Console on Citrix presentation server:
- On the left panel of AMC, right click on the application being tested and expand the ‘Citrix resources’
- Expand ‘Presentation Server’ and then Server Farm Name.
- Expand ‘Applications options’
- Select properties. This opens the ‘Application Properties’ dialog box.
3.At times we might have to open advanced options and select the ‘limits options’. One must ensure that following options are unchecked –
- Limit instances allowed to run in server farm
- Allow one instance of application per user
4. Number of vusers per LoadGenerator Machine:
A LoadGenerator machine can run only a limited number of Citrix Vusers at the same time. This is due to the graphic limitations of that machine. This limits the performance load that be applied to the application. To solve this problem and increase the number of vusers per machine -
1. Open a terminal server session on that machine.
2. Call this terminal server session as a new Virtual-user injector machine.
3. Connect to this new virtual injector machine from controller. To connect, use respective machine names e.g. Machine_001, Machine_002, etc (Or) respective IP Addresses.
4. Use these additional machines as LoadGenerators.
5. IP Spoofing characteristics With Citrix
Some applications restrict users to only one IP address and hence require a unique IP address for every virtual user. This feature is enabled for application security, session pooling or many other reasons. LoadRunner’s IP Spoofing is not supported for Citrix Protocol. However, each Citrix session can be configured to use a different IP address by making configuration-setting changes on the Citrix Presentation Server.
For Citrix version 4.5, by referring to tutorial downloaded with the application, one can find this information in the 4th chapter, which is “Using Virtual IP Addresses with Published Applications”. The Citrix administrator’s presence is important here since, these configuration changes require registry changes on the server.
6. Pointing appropriately to the correct ICA file:
Connection should be configured appropriately to point to the correct ICA file. If Windows authentication keeps popping up, it is likely to be because of the Active Directory’s inability to authenticate the user. The ICA files may be located in current user’s profile but not in Virtual buy capsiplex user’s profile. Hence while replaying or executing test, the vuser will not be able to point to the ICA file. This will cause script replay to fail.
Usage of Web_set_user function for Multi-protocol Citrix + Web script –
In case of multiprotocol script, NTLM authentication is required to be provided. In the case of NTLM authentication or proxy server, domain name, user id, password and post port with appropriate information is required to be added. In such cases web_set_user() function should be used –
1
| web_set_user("DomainName\UserID", "password", "host:port"); |
Dynamic Synchronization for Bitmap Changes
For transactions that involve data-entry, synchronization of bitmaps while changing menus, tabs and windows is necessary to ensure that exact menu/tab/window loads successfully. For the free flow of performance scripting, identifying when a bitmap changes. This allows the script to wait until an application process is finished. The LR function that allows monitoring of the bitmap changes is “ctrx_sync_on_bitmap_change”.
The syntax of this function is:
1
| ctrx_sync_on_bitmap_change (x_start, y_start, width, height, <optional arguments>, CONTINUE_ON_ERROR] CTRX_LAST); |
During script execution, this function sets the value of the defined bitmap and waits for it to change. At times, bitmap changes before the call to wait is made. In such cases, it becomes necessary for the script to set the value of the bitmap before initiating the command that changes it. Inserting original bitmap value in the ctrx_sync_on_bitmap_change function helps here. If the bitmap has not changed, ctrx_sync_on_bitmap_change will wait until the bitmap changes, otherwise it continues as normal. If a predetermined bitmap value is used, all arguments for the function will be required. The syntax of the function is:
1
| ctrx_sync_on_bitmap_change(x_start, y_start, width, height, initial wait time, timeout, bitmap value, CTRX_LAST); |
In my next article, I will discuss more points that will help performance test engineers working on Citrix protocol.
No comments:
Post a Comment