Citrix Tips & Tricks

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Citrix Tips & Tricks as PDF for free.

More details

  • Words: 3,744
  • Pages: 17
4/23/2003 LOADRUNNER CITRIX TIPS & TRICKS

REQUIREMENT...............................................................................................................2 For LoadRunner7.51 ..................................................................................................2 For LoadRunner7.6 and above:..................................................................................2 HOW TO FIND OUT THE CURRENT CITRIX SERVER VERSION ......................2 For MetaFrame XP:....................................................................................................2 For MetaFrame 1.8:....................................................................................................2 WHAT CITRIX METAFRAME VERSIONS DOES LOADRUNNER SUPPORT....2 WHICH CITRIX CLIENT TYPE DOES LOADRUNNER SUPPORT?....................3 For running Vusers as threads:...................................................................................3 For running Vusers as process:...................................................................................3 COMMON PROBLEMS...................................................................................................4 Record..........................................................................................................................4 Replay..........................................................................................................................8 BITMAP SYNC INFORMATION.................................................................................14 256-Colors settings....................................................................................................15 Windows Terminal ....................................................................................................15 CITRIX FUNCTIONS – ADDITIONAL INFORMATION........................................15 COMMON PRACTICE..................................................................................................16 REQUIREMENT FOR CITRIX MONITOR...............................................................17 ADDITIONAL INFORMATION...................................................................................17

1

4/23/2003

Requirement Recording against Citrix ICA client is supported starting with LoadRunner 7.51.

For LoadRunner7.51 a. Install LoadRunner 7.51 and apply the liveupdate (SP1) b. Install Citrix_ICA_Add-in.exe patch from LoadRunner’s patches database under LoadRunner  LR7.51SP1  Citrix  LR751SP1P1 c. Install Citrix client (6.30.1060.zip) and Citrix_patch_27.exe from LoadRunner’s patches database under LoadRunner  LR7.51SP1  Citrix  LR751SP1P27

For LoadRunner7.6 and above: The Citrix Vuser type will be supported out of the box. However, you need to go to the add-ins  Citrix Client folder on the CD to install the Citrix client.

How to find out the current Citrix server version Inside the Citrix Connection Configuration click on Help -> About. It should mention somewhere in the window the current MetaFrame server version and any SP or FR applied. To get to ‘Citrix Connection Configuration’,

For MetaFrame XP: Click on Start -> Programs -> Citrix -> MetaFrame XP -> Citrix Connection Configuration.

For MetaFrame 1.8: Click on Start -> Programs -> MetaFrame Tools -> Citrix Connection Configuration.

What Citrix MetaFrame versions does LoadRunner support LoadRunner supports both MetaFrame XP and 1.8: 1. For MetaFrame XP, all versions (a, e and s) are supported. You must have at least Feature Release 1 (FR1) applied on top of MetaFrame XP in order for LoadRunner to support your environment. Citrix MetaFrame XP comes in three flavors: • • •

XPs - Standard Edition - Designed for departments or workgroups XPa - Advance Edition - Designed for medium businesses XPe - Enterprise Edition - Designed for the enterprise business

FR = Feature Release. This is basically a service pack, which is used to correct current problems and new product features that were unavailable before. 2. For MetaFrame 1.8, you must have SP3 applied on top of it in order for LoadRunner to support your environment. 2

4/23/2003

Which Citrix client type does LoadRunner support? LoadRunner support the Win32 ICA client and Nfuse client. You must go to the Mercury Interactive Customer Support website to obtain the Citrix ICA client provided by Mercury Interactive that includes the testing APIs. Refer to the ‘Requirement’ section for further information. As of current, LoadRunner does not support the ICA Java client. However, since the communication between the Java client and the Windows client in identical, using the Windows client will simulate the same load on the server.

Citrix Memory Footprint For running Vusers as threads: Mdrv Wfica32.exe Summary

Swap per user 0.42 MB 5.9 MB 6.32 MB

Ram per user 0.43 MB 7.3 MB 7.73 MB

For running Vusers as process: Mdrv Wfica32.exe Summary

Swap per user 4.9 MB 5.5 MB 10.4 MB

3

Ram per user 5.9 MB 7.3 MB 13.2 MB

4/23/2003

Common Problems Record Q.

R.

b.

c.

When recording against a Citrix Nfuse website using Multi-Protocol, after clicking on the published application icon to create a connection to the Citrix server, an SSL Certificate Error appeared. To get past the errors please do the following: a. In the port-mapping tab, delete the current entry for port 443 and add the following 2 entries as shown:

The port-mapping tab should look like the following after both entries are entered:

Record a new script and the error should not occur again.

4

4/23/2003 Q. R.

During recording, there is a window titled “ICA Seamless Host Agent” that pops up. When manually logging into the application there is no such popup. This popup is a result of the mode that VuGen is recording in. The Citrix solution requires that LoadRunner record in this mode. This is an informative window popup and not an error. To work around it, simply click on OK and it will go away.

Q. During recording, VuGen launches the Citrix ICA client but NOTHING is recorded. R. This happens when you have your own Citrix client installed on the recording box in addition to Mercury’s. Go to the Control Panel and uninstall ALL PREVIOUS Citrix ICA and Citrix Web clients on the box PRIOR to installing Mercury’s.

Q.

R.

VuGen cannot launch the Citrix ICA client during a Citrix recording. When launching the application, the following error pops-up

You will get the error if you are recording against your own Citrix client instead of LoadRunner’s Citrix client (runDlg.exe) thru VuGen. The solution is to specify the path to \bin\runDlg.exe in the Program to record field, and have \bin in the Working directory.

Q. Internet Explorer disappears during a Multi protocol Nfuse recording as soon as the Citrix ICA client is launched. R. Check to see if the machine has been set up to record against multiple processes. Go to the registry editor to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsAppInit_DLLs and check to see if it’s pointing to bbhook.dll. If it is then remove the entry and then reboot the machine. 5

4/23/2003

Q. R.

Internet Explorer disappears or crashes during a Multi protocol Nfuse recording as soon as the browser is launched. Check to see if the machine has any Anti-Virus software running. Try shutting down the Anti-Virus services. If you have McAfee Anti-Virus installed, shut down the following services: • •

AVSyncManager McShield

If you have Norton Anti-Virus installed, shut down the Norton Antivirus service from the services menu. For Windows 2000 machine, go to Start -> Settings -> Control Panel -> Administrative Tools -> Services. For Windows NT machine, go to Start -> Settings -> Control Panel -> Services.

Q. R.

Q. R.

The Citrix ICA client window is minimized after it is launched during recording. Clicking on the icon on the taskbar does not bring it up. Right click on the Citrix ICA Client icon on the taskbar and select maximize. This will bring the client back to the restored view. Adjust the window size as necessary. Do not minimize the Citrix ICA Client window during replay, as this will cause the same problem to occur again.

The Recording Options in VuGen is NOT reflecting the changes being made in it. The user changes the information, clicks on OK, but when going back to the Recording Options the information is still not changed. Click on the “Use Defaults” button to clear the information and then re-enter it again. Or, you can go to the LoadRunner\dat directory and look for citrix_ro.ini. This file contains information from the Recording Options. Make sure the changes are being reflected here.

Q. Recording against a drop down menu does not work. During replay it fails on the ctrx_mouse_click when it is supposed to select an item from the drop down. R. Use arrow keys instead of mouse click to select an item from the drop down during recording.

Q. When performing bitmap sync during recording, the following error pops up: 6

4/23/2003

R. Make sure that you are not connecting to another Citrix server within the first Citrix session. If this is true, then the hashing mechanism will not work and you will see an error. This is because an ICA session cannot create an OffScreen surface when embedded in another ICA session. It is this OffScreen mechanism that allows the Screen Capture/hashing functionality

Q.

When recording a Citrix ICA script, only 3 events are recorded. Afterwards, mouse click movements are not being recorded. When logging off, the server gets the following error:

R.

This can happen when the OS that LoadRunner’s installed on is NT 4.0 SP6. Please connect to the Citrix server without VuGen first and then try recording in VuGen again.

Q. Upon login, the user is getting a popup window indicating the user is using an older version of the Citrix client. 7

4/23/2003 R. 1. Log into the Citrix server as a user with administrative privileges. 2. Clicks on Start -> Programs -> Citrix -> MetaFrame XP -> ICA Client Update Configuration. 3. The ICA Client Update Configuration window should come up showing you a list of Citrix ICA clients installed on the server. 4. Right click on the Citrix ICA Win32 Client icon that the server is giving users popup messages for, and select Properties. 5. In the Description tab, uncheck the box that says, "Enabled" and then click on Apply. Please see screen shot below.

Q. During recording, user recorded bitmap sync. User then opened the .bmp file in the <script directory>\data folder. The bitmap does not look the same as the one taken during recording. R. Sometimes when you use 256-colors setting, the recorded bitmaps in the script's data directory do not have the same color as you saw during recording. This should not matter as long as the bitmap hash value stays the same during replay. For further information, refer to Bitmap Sync Information section.

Replay

8

4/23/2003 Q. Sometimes, VuGen records an index after the window name. For example, sometimes it records “EMPOWER By Eastern Software Corporation_2”, while other times it just records “EMPOWER By Eastern Software Corporation”. Because of this, replay fails if the window name does not match exactly. R. Sometimes, during recording the server is sending LoadRunner 2 windows with the same name, and therefore LoadRunner will put an index after it. The workaround is to put some logic in the script to handle it. Below is an example. if (!ctrx_win_exist("EMPOWER By Eastern Software Corporation_2"); ctrx_mouse_click(15, 32, LEFT_BUTTON, 0, "EMPOWER By Eastern Software Corporation"); else ctrx_mouse_click(15, 32, LEFT_BUTTON, 0, "EMPOWER By Eastern Software Corporation_2");

Q. R.

The Citrix ICA client window is minimized during replay. Clicking on the icon on the taskbar does not bring it up. Right click on the Citrix ICA Client icon on the taskbar and select maximize. This will bring the client back to the restored view. Adjust the window size as necessary. Do not minimize the Citrix ICA Client window during replay, as this will cause the same problem to occur again.

Q. R.

Mdrv errors when running a Citrix load test. Try lowering the number of threads per driver. To lower the number of threads per driver, from the Controller and on Tools -> Expert Mode. Then, click on Tools -> Options -> Agent. Where it says “Max threads for driver”, lower the number from 50 to a smaller number such as 10. If the problem persists, try running the Vuser as a process instead.

Q.

Replay of a Multi protocol Citrix Nfuse script is failing on ctrx_nfuse_connect_server with the following error: vuser_init.c(x): Saving Parameter "Param1 = Object moved\n

Object Moved

This object may be found

9

4/23/2003 here.\n \r\n \r\n \r\n <SCRIPT Language="JavaScript" type="text/javascript">\r\n \r\n \r\n \r\n \r\n " vuser_init.c(x): t=xxms : Request done "http://xxx.xxx.xxx.xxx/logout.asp?sessionExpired=On" vuser_init.c(x): web_url was successful, xx body bytes, xx header bytes vuser_init.c(xx): Waiting for event ... vuser_init.c(xx): Error Connect can not be established - Last Error=70, Last client error=1030

R.

Check that the nfuse_1.ica file is successfully created in the script directory during replay. The contents of the ICA file should look similar to the following (HINT: Open in Notepad or else it will try to connect to the server!): Nfuse_1.ica

If the file contains something else then you can do the following: 1.

Check that the cookie and header information is handled properly in all the web requests prior to the ctrx_nfuse_connect statement. It may be necessary to manually add some web_add_header or web_add_cookie statements. An easier approach is to record a single protocol web script up to the point where the published application is launched. Stop the recording, copy the web requests recorded and paste it above the ctrx_xxx functions in the Multi protocol script. You need to comment or delete the original web requests that are recorded above the ctrx_xxx functions.

2.

Check to see if NFuse_UID is recorded inside the ctrx_nfuse_connect statement. If it is then you need to correlate it. Below is an example of the correlation: web_reg_save_param("NFuse_UID", "LB=NFuse_UID=", "RB=&NFuse_App", LAST); web_url("Word", "URL=http://xxx.xxx.xxx.xxx/citrix/nfuse16/launch.asp?NFuse_Application =Word”, "Resource=0", "RecContentType=application/x-ica", "Referer=http://xxx.xxx.xxx.xxx/citrix/nfuse16/applist.asp?NFuse_currentFo lder=", "Mode=HTTP", LAST); ctrx_nfuse_connect("http://xxx.xxx.xxx.xxx/citrix/nfuse16/launch.asp\?NFuse_U ID=&NFuse_Application=Word&NFuse_MIMEExtension=.i ca");

Q.

How to increase the number of Citrix Vusers that can be executed on each Load Generator machine.

R.

Machines running Citrix Vusers may be limited in the number of Vusers that can run, due to the graphic resources available on that machine. To increase the 10

4/23/2003 number of Vusers, open multiple Terminal Server sessions to the load generator machine and relate each terminal server session to the load generator. This means a Terminal Server must be running on the load generator. Windows 2000 Server and Advanced Server both come with Terminal Server. If you are not using one of these OS then please contact Microsoft on how to purchase Terminal Server separately. Please follow the instructions below: NOTE: Any ctrx_sync_on_bitmap that is recorded using a non-256 color setting will fail on replay on a terminal session. For further information, refer to Bitmap Sync Information section. 1. Set the ‘CitrixIsActive’ option: a. On each load generator box, go to Start -> Programs -> LoadRunner -> Advanced Setting -> Agent Settings, the br_lnch_server.cfg file will comes up. b. Search for the [Citrix] section, and set CitrixIsActive=1. 2.

From any computer that has the Terminal Services Client installed, create at least two connections to the load generator. If the load generator has Terminal Services Client installed, then create a connection to itself. Then, startup the LoadRunner Agent Process in each Terminal Server Session.

3.

From the Controller, define your load generators using the following convention: <machine_name or IP>:1 <machine_name or IP>:2 <machine_name or IP>:3 11

4/23/2003

You need to define one load generator in the Controller for each terminal server session that you have created. The above example is for 3 terminal server connections to the load generator. NOTE: Unfortunately, there is no sure way to tell how many Citrix Vusers each terminal session can support. You may need to experiment with ramping up Vusers on each load generator until the graphic resource is exhausted (i.e. by looking at the terminal session you just created, the screen refresh is not optimal). 4. Test and make sure you can connect and run 1 Vuser on each load generator before running the full load test. NOTE: If your script contains ctrx_sync_on_bitmap functions that were recorded on a desktop that has a non-256 colors setting (such as 16-bit or 32-bit), the function will fail on replay through the terminal session. For further information, refer to the Bitmap Sync Information section. Below is a schematic diagram of the overall architecture of a Citrix load test.

Q. R.

ctrx_sync_on_bitmap function failed during replay. Check that the bitmap taken during recording is not dynamic. If it is, then change the function from ctrx_sync_on_bitmap to ctrx_sync_on_bitmap_change. Follow the example and syntax given in the function reference. 12

4/23/2003 If the bitmap is NOT dynamic but the ctrx_sync_on_bitmap is still failing on replay, then please do the following: 1.

Go to the script’s data directory. There should be a bitmap file with the name of the recorded hash value. For example, ea58db927f9135863b6deccf9e38c81d.bmp

2.

The execution log from the replay should indicate the new hash value obtained on the ctrx_sync_on_bitmap if you enabled extended log with “Advanced Trace” checked. EXAMPLE: vuser_init.c(15): Wait for bitmap=ea58db927f9135863b6deccf9e38c81d the current bitmap is 7e7fec50972aba43a19dda56d19c6b4a vuser_init.c(15): Waiting for event ... vuser_init.c(15): Exit on timeout..

3.

Look for a bitmap file with the name of this new hash value inside the script folder. For the example above, look for 7e7fec50972aba43a19dda56d19c6b4a.bmp inside the script folder.

4.

Compare the recorded bitmap with the new bitmap obtained during replay. There should be a difference, and that is why the ctrx_sync_on_bitmap is failing.

Q.

Some of the Citrix Vusers are failing in the Controller. Is there a way to show the Citrix client during replay?

R.

Use the –lr_citrix_vuser_view command line: a. Go to the Design view in the Controller. Click on Details -> More. b. In the field where it says “Command line”, enter –lr_citrix_vuser_view. This will bring up a Citrix client on the load generator box for each running vuser.

Q. The ctrx_sync_on_bitmap function replays fine on the recording machine but fails during replay on another machine. R. 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 and the other Default Options settings on the desktop. These setting affect the hash value of bitmaps and inconsistencies may cause replay to fail. For more information, refer to Bitmap Sync Information section. Q. User is able to run one Citrix Vuser from the Controller without a problem. However, running 2 or more Citrix Vusers gives an error with a “Terminal Services Warning” for Vusers 2-x.

13

4/23/2003

R.

Check and see if you can manually connect 2 users from the Citrix client to the Citrix server. When booted into Administration mode, only 2 users can connect to the box at the same time. When booted into Application mode, the limit is dependent on the Terminal Server license that you have.

Q. R.

How to replay Citrix script against a different window size? Go to the script directory in Windows Explorer. Open the default.cfg file located inside the script directory and change the window= value under the [CITRIX] section to a valid value that can be seen in the recording options (640 x 480, 800 x 600, or 1024 x 768). Please note that if you have any ctrx_sync_on_bitmap functions recorded it will not replay in the new window setting because the hash value will be different.

Q.

User recorded clicking on the OK button inside the “ICA Seamless Host Agent” window. During replay, this window may not come up and causes the replay to fail. How to handle this in the script? Put in a condition statement and use the ctrx_win_exist function to check for the window. EXAMPLE: if (ctrx_win_exist("ICA Seamless Host Agent", 9) = = 0) { ctrx_mouse_click(206, 195, LEFT_BUTTON, 0, NULL); }

R.

Bitmap Sync Information

14

4/23/2003 The color settings of the desktop where VuGen is installed, affects the Color settings (256 color, 16-bit, 24-bit, or 32-bit) recorded for bitmap sync. The colors settings in the Citrix Client or Server does not matter. NOTE: In LoadRunner 7.6, the Window Colors option from the recording option in VuGen is removed in order to avoid the above confusion.

256-Colors settings 1. The bitmaps recorded into the script's data directory may not have the same color as what is seen on recording. This will be fine, as long as the bitmap hash value stays the same. 2. 256-color setting is that it is OS dependent. For the same region, you might get a different hash value on Windows NT compared to Windows 2000. If you use 256colors setting to record a script on Windows 2000, it will run fine on terminal session. LoadRunner does not have such problem with 16-bit color setting or higher.

Windows Terminal A Terminal Client session uses 256-color setting and this cannot be changed. For such, if you intend to use Terminal sessions during load test, make sure that the following is true: • Record in 256-color setting • Record from a Windows 2000 box

Citrix functions – additional information 1.

ctrx_mouse_click() 15

4/23/2003 If there is a window name listed for the last argument then the x/y coordinates (first and second arguments) are relative to this window. 2.

ctrx_sync_on_bitmap() The encrypted code depends on the position/size/resolution/colors and the contents of the bitmap. The value is supposed to be constant as long as you do not change any of the mentioned factors.

3.

ctrx_set_window() Sometimes, LoadRunner will record ctrx_set_window() (e.g. ctrx_set_window("0_37_348_265"); ) for opening of menu list, e.g. File -> Exit where the menu list box is interpreted as a window. This happens because LoadRunner always make sure that the menu is already open and ready before selecting an item. The name in this case depends on the menu position.

4.

ctrx_key() A list of usable keys: SHIFT_KEY CTRL_KEY ALT_KEY BACKSPACE_KEY TAB_KEY ENTER_KEY PAUSE_KE ESC_KEY CAPS_LOCK_KEY PAGE_UP_KEY PAGE_DOWN_KEY END_KEY HOME_KEY LEFT_ARROW_KEY UP_ARROW_KEY RIGHT_ARROW_KEY DOWN_ARROW_KEY NUM_LOCK_KEY PRINT_SCREEN_KEY INSERT_KEY DELETE_KEY

SCROLL_LOCK_KEY F1_KEY F2_KEY F3_KEY F4_KEY F5_KEY F6_KEY F7_KEY F8_KEY F9_KEY F10_KEY F11_KEY F12_KEY MULTIPLY_KEY ADD_KEY SUBTRACT_KEY DIVIDE_KEY

Common Practice

16

4/23/2003 1.

Reset the connection if a user disconnects from the Citrix session without logging off. If the server is not configured this way, then there will be a lot of remaining idle sessions on the server during load test. Below are instructions on how to configure the server to reset the session (this is taken from the latest Citrix document): a. Open the "Citrix Connection Configuration" dialog box by going to Start  Programs  Citrix  MetaFrame XP  Citrix Connection Configuration. b. Double-click on the “ica-tcp” connection name. The “Edit Connection” dialog box appears. c. Click on the “Advanced” button. The “Advanced Connection Settings” dialog box appears. d. Uncheck the “inherit user config” checkbox and change the list box entry for “On a broken or timed-out connection “ to “reset”.

2.

See the “Tips for Working with Citrix Vuser Scripts” section in the Citrix documentation for recording, replay, and debugging tips.

3.

Replay your script with ‘Replay think time as recorded’. This will help to ensure that the script replay will wait for x amount of time for the windows to come up before executing the next step.

Requirement for Citrix Monitor 1.

LoadRunner’s Citrix monitor will use the same username/password as the Controller box to login to the Citrix server. Therefore, make sure you have the same set of username/password on the Citrix box with administrative privileges on both machines.

2.

When monitoring a counter under the ICA Session object, please be sure that at least one session is currently connected to the server. Otherwise, you will not be able to add any counters.

3.

If you are unable to monitor the ICA Session object, try mapping a drive from the Controller to the Citrix box through Windows explorer first.

Additional information 1. Public webinar replay with Citrix discussing the problems, challenges, solutions and timeframes for LoadRunner for Citrix. 2. New white paper (endorsed by Citrix)

17

Related Documents

Citrix Tips & Tricks
November 2019 6
Tips & Tricks
May 2020 8
Tips & Tricks
June 2020 9
Tips&tricks
June 2020 13
Tips & Tricks
December 2019 27
Tips And Tricks
November 2019 33