How Do you Parameterize a Citirix Script?

118 views
Skip to first unread message

Stimely, Noelle

unread,
Feb 23, 2011, 11:26:07 AM2/23/11
to lr-loa...@googlegroups.com
Below is text captured from a Citrix recording. I do not see my patient name (parameter) listed like I do in normal scripts. I am using Citrix + HTTP Protocol to record.

vuser_init()
{

ctrx_set_connect_opt(APPLICATION, "#Hyperspace 2010-SUP");

ctrx_set_connect_opt(NETWORK_PROTOCOL, "TCP/IP + HTTP");

ctrx_connect_server("64.54.43.254:1494", "loadrunner1", lr_decrypt("4d65322c54bf1230aeed14fc637d1a"), "ucsfmc", CTRX_LAST);

ctrx_wait_for_event("LOGON", CTRX_LAST);

lr_think_time(7);

ctrx_sync_on_window("Hyperspace - UCSF SUP", ACTIVATE, 64, 39, 1025, 768, "", CTRX_LAST);

ctrx_type("ipuc", "", CTRX_LAST);

ctrx_key("TAB_KEY", 0, "", CTRX_LAST);

ctrx_type("model", "", CTRX_LAST);

ctrx_key("ENTER_KEY", 0, "", CTRX_LAST);

ctrx_key("ENTER_KEY", 0, "", CTRX_LAST);

lr_think_time(9);

ctrx_sync_on_window("Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", ACTIVATE, 98, 9, 1025, 768, "", CTRX_LAST);

ctrx_mouse_click(242, 35, LEFT_BUTTON, 0, "Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", CTRX_LAST);

lr_think_time(4);

ctrx_mouse_click(271, 329, LEFT_BUTTON, 0, "Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", CTRX_LAST);

ctrx_mouse_click(945, 230, LEFT_BUTTON, 0, "Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", CTRX_LAST);

ctrx_type("t", "", CTRX_LAST);

ctrx_key("TAB_KEY", 0, "", CTRX_LAST);

ctrx_type("n", "", CTRX_LAST);

ctrx_key("TAB_KEY", 0, "", CTRX_LAST);

ctrx_key("TAB_KEY", 0, "", CTRX_LAST);

ctrx_key("TAB_KEY", 0, "", CTRX_LAST);

ctrx_type("3", "", CTRX_LAST);

ctrx_key("TAB_KEY", 0, "", CTRX_LAST);

lr_think_time(10);

ctrx_mouse_click(987, 716, LEFT_BUTTON, 0, "Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", CTRX_LAST);

ctrx_mouse_click(997, 111, LEFT_BUTTON, 0, "Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", CTRX_LAST);

ctrx_mouse_click(976, 31, LEFT_BUTTON, 0, "Hyperspace - 14L MEDICINE - UCSF SUP - CLERK I.", CTRX_LAST);

ctrx_mouse_click(1014, 10, LEFT_BUTTON, 0, "Hyperspace - UCSF SUP", CTRX_LAST);

ctrx_disconnect_server("64.54.43.254:1494", CTRX_LAST);

return 0;
}

NS

chaitanya bhatt

unread,
Feb 23, 2011, 12:28:33 PM2/23/11
to lr-loa...@googlegroups.com, Stimely, Noelle
Noelle,

I suggest you follow the LoadRunner Citrix scripting best practice:

1. Use keyboard. Ideally over 95% of your script's input data should be fed via key strokes rather than mouse clicks. Mouse click often tends to fail during replay and can hide parameter inputs. Your input won't get captured if your patient was selected from mouse click.

2. Install Citrix agent on the server box to increase the robustness of your script. Citrix agent allows Loadrunner to recognize application objects such as buttons and fields by their properties. This increases the accuracy of object activation during script replay.

3. Decrease the type rate when in runtime settings.

4. Always have a batch program to kill the previous terminal session before starting the next iteration. You can use the system() function to do this bit. Typically when you re-iterate a flow - certain windows/popups might not close and can disrupt the flow of screen sequence. This can be avoided by disconnecting the session and reconnecting it back before starting a new iteration. One MAJOR trade off with this approach is that you will logging unusually high number of times than real world logging attempts. Get a consent from your client before you do this.

There are more points, but

-Chaitanya M Bhatt




--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

chaitanya bhatt

unread,
Feb 24, 2011, 2:40:59 AM2/24/11
to raja sekhar, lr-loa...@googlegroups.com, Stimely, Noelle
>I am using Citrix Xen App 6.0 hosted on Windows server 2008.
>Lr 11.0 on Windows server 2003.
>I want to install LR citrix agent on Citrix Server,
>Let me know is it compatible , if it is compatible please help me in installing it.
 
Yes it is compatible with Windows server 2008. In the LoadRunner disc you will find loadrunner citrix agent in the additional components section. It is an installable file (exe).
 
-Chaitanya M Bhatt
On Thu, Feb 24, 2011 at 12:08 PM, raja sekhar <rajafor...@gmail.com> wrote:
Hi Chaithanya,
 
Regarding your comment ,


2. Install Citrix agent on the server box to increase the robustness of your script. Citrix agent allows Loadrunner to recognize application objects such as buttons and fields by their properties. This increases the accuracy of object activation during script replay.
 
I am using Citrix Xen App 6.0 hosted on Windows server 2008.
Lr 11.0 on Windows server 2003.
 
I want to install LR citrix agent on Citrix Server,
 
Let me know is it compatible , if it is compatible please help me in installing it.
 
Thanks in advance
 
Rajasekhar


chaitanya bhatt

unread,
Feb 24, 2011, 7:28:09 AM2/24/11
to raja sekhar, lr-loa...@googlegroups.com, Stimely, Noelle
Only agent installation is sufficient. Remember to inform the client about the additional memory and CPU usage consumed by this agent on the server. ~2mb of physical memory space is consumed per vuser by ctrxagent.exe process during test execution. You can see this agent process spawned during load test from via task manager in the Win 2008 server. So if you are running a 20vu test then 20*2 mb of space will used in the server only for ctrxagent.exe process. You will have to carefully deal with this issue. Inform you client about the pros and cons of using this agent on this server. It will affect your test results significantly however this is the only way you can create a relatively robust citrix loadrunner script. The problem is choosing between testing approach against accuracy of test result.
 
-Chaitany M Bhatt
On Thu, Feb 24, 2011 at 4:27 PM, raja sekhar <rajafor...@gmail.com> wrote:
 
Chaitanya,
 
is it required to install LR 11.0 on windows server 2008 and then install the Citrix agent which is in Additional components  (or)  only installing Citrix agent which is in additional components is enough.

raja sekhar

unread,
Feb 24, 2011, 1:38:22 AM2/24/11
to lr-loa...@googlegroups.com, chaitanya bhatt, Stimely, Noelle
Hi Chaithanya,
 
Regarding your comment ,

2. Install Citrix agent on the server box to increase the robustness of your script. Citrix agent allows Loadrunner to recognize application objects such as buttons and fields by their properties. This increases the accuracy of object activation during script replay.

raja sekhar

unread,
Feb 24, 2011, 5:57:29 AM2/24/11
to chaitanya bhatt, lr-loa...@googlegroups.com, Stimely, Noelle

Speedmaster

unread,
Feb 24, 2011, 9:28:23 AM2/24/11
to LoadRunner

> 4. Always have a batch program to kill the previous terminal session before
> starting the next iteration. You can use the system() function to do this

Chaitanya, can you tell me more about this? Do you have a sample batch
script that you could share? :-)

Thanks in advance!

Chris
http://amateureconblog.blogspot.com/
http://twitter.com/speedmaster

Stimely, Noelle

unread,
Feb 24, 2011, 9:52:30 AM2/24/11
to chaitanya bhatt, raja sekhar, lr-loa...@googlegroups.com

Also, there are 2 Loadrunner Citrix agents.  Be sure to install the 64 bit agent which was added to support in January.

 

Noelle

Stimely, Noelle

unread,
Feb 24, 2011, 10:26:56 AM2/24/11
to lr-loa...@googlegroups.com

I logged a ticket with support to find out how to parameterize a Citrix script this was their response:

 

For the Citrix section, you can create parameters normally and replace certain values in the script.

For example :

Ctrx_type("shellfish", "", CTRX_LAST);

You could create a parameter for the value of shellfish, resulting in :

Ctrx_type("{DATA_PARAM_1}", "", CTRX_LAST);

 

Values in the ctrx_type function ( from your script : ‘fammd’, ‘model’, ‘test’, ‘98.5’, ‘shellfish’, ‘shee’, ‘llfish’; which are your input data ) can be parameterized.

Correlation doesn’t exist in Citrix, since there is a synchronization via bitmaps.

 

Hope it helps!

 

Noelle

 

From: chaitanya bhatt [mailto:bhatt.c...@gmail.com]
Sent: Thursday, February 24, 2011 4:28 AM
To: raja sekhar
Cc: lr-loa...@googlegroups.com; Stimely, Noelle
Subject: Re: How Do you Parameterize a Citirix Script?

 

Only agent installation is sufficient. Remember to inform the client about the additional memory and CPU usage consumed by this agent on the server. ~2mb of physical memory space is consumed per vuser by ctrxagent.exe process during test execution. You can see this agent process spawned during load test from via task manager in the Win 2008 server. So if you are running a 20vu test then 20*2 mb of space will used in the server only for ctrxagent.exe process. You will have to carefully deal with this issue. Inform you client about the pros and cons of using this agent on this server. It will affect your test results significantly however this is the only way you can create a relatively robust citrix loadrunner script. The problem is choosing between testing approach against accuracy of test result.

Reply all
Reply to author
Forward
0 new messages