You are on page 1of 12

Oracle Applications 11.5.

9 script
generation utilizing Mercury
LoadRunner™
by Jason DeLano

© Copyright 2006 Aderas, Inc. All Rights Reserved May 18, 2006
http://www.aderas.com

About Aderas

Aderas, Inc. is a technology consulting firm specializing in Oracle Enterprise Resource


Planning (ERP) and Custom Technology Strategy, Systems Integration, as well as
Systems Architecture. Aderas employs a team of Oracle Subject Matter Experts (SME),
systems architects, applications and traditional database administrators,
applications/database designers and developers, and implementation specialists. We have
in depth experience and knowledge in Oracle ERP extensions, custom Java/C/C++
development, Disaster Recovery (DR), Continuity of Operations Planning (COOP),
middleware integration, systems migration, interface development, capacity performance
tuning, and high-volume secured transaction architectures. We help our clients meet their
business goals through leveraging and maximizing their investments in Oracle
technologies.

About Jason DeLano

Jason Delano is an Oracle Certified Professional (OCP) Performance DBA with over eight years
experience working with Oracle database technology. Since joining the Oracle’s Architecture
Services group, he has provided leadership and technical skills to Oracle’s largest accounts
including the Centers for Medicare & Medicaid Services, GE Medical Systems, GE Aircraft
Engines, GE Engines Services, GE Power Systems, GE Capital Structured Finance Group, EMC
Corporation, Eaton Manufacturing Corporation, Marsh, Xerox, Kellogg Corporation, and
Oracle’s Consumer Packaged Goods Division. He has used LoadRunner to Stress and
Performance Test Oracle Applications on 10.7 SC, 10.7NCA, 11.0.x, and 11.5.x. During this
time he has expanded his knowledge of the LoadRunner Tool to keep abreast on the changes in
technology. LoadRunner allows him to simulate a large number of end-user activities in a
repeatable method so he can tune/optimize the Oracle Application Server and Oracle Database to
support the end user load proactively. His ability to leverage his strong technical skills and solid
business background has proven to be a valuable asset for administering and tuning Oracle
Database technology, Oracle Applications, and customized applications. Jason currently leads
Aderas’ performance and tuning group.

eMail: jason.delano@aderas.com

© Copyright 2006 Aderas, Inc. All Rights Reserved 2


http://www.aderas.com

Scope

The purpose of this white paper is to describe the initial setup and configuration of the
LoadRunner software. LoadRunner is a load-testing tool that predicts system behavior
and performance. It exercises an entire enterprise infrastructure by emulating thousands
of users to identify and isolate problems. When using Oracle Applications which
requires a multi-protocol script there are a few steps that cause problems when attempting
to replay the script that are covered in this whitepaper

About LoadRunner

The LoadRunner tool works by recording user navigation and inputs as the business
transactions are executed. The user can then replay the test script with some modification
to re-execute the same business process. LoadRunner allows the user to modify the
scripts to handle random inputs, and/or navigation. This allows the test team to simulate
users doing different activities and inputting different data sets.

The LoadRunner software is loaded onto a client PC, which will be using the application
software. This client PC must be configured to use the Oracle Application (Jinitiator
software should be loaded by logging onto the application once before recording the
script).. The LoadRunner software install takes about 250MB of disk space. To install
the software follow the LoadRunner installation Guide, included with the software.
Select the typical configuration and follow the screens to completion. A maintenance
number, and license key are needed to install the software.

Recording Oracle Applications

In order to utilize the end to end infrastructure of the Oracle Applications we need to
record a multi-protocol script within Mercury LoadRunner. This involves recording the
HTTP traffic communicating to the Oracle Application Server along with the
mod_jserv/Forms activity that is generated through the forms client. The HTTP traffic is
generated at the initial login and startup of the application. After the Forms Applet
window is lauched the tool will then begin recording the applet traffic. To begin
recording Oracle Application virtual user scripts there are a couple of setup items that are
required. By default the Oracle Application Applet window does not transfer the Java
Object names in the applet. To enable the passing of the Java Object names one of the
following must be done.

Option 1:

© Copyright 2006 Aderas, Inc. All Rights Reserved 3


http://www.aderas.com
On the web servers for your Release 11.5.x applications log on as the application
owner (applmgr). Go to the $OA_HTML/bin directory and alter the appsweb.cfg
file. In this file update the line with record= and append to it ‘names’. The line
should read

record=names

The appsweb.cfg file is the configuration file for the appsbase.htm file which is
used to startup the applications (applet) window. Before each connection is made
the variables will be read from the appsweb.cfg file, therefore restarting the
web/forms servers are not necessary.

Option 2:

Change the “ICX: Forms Launcher” profile option in the database to add the
following string at the end of the value “?record=names”

Before: http://aderas.com:8001/dev60cgi/f60cgi
After: http://aderas.com:8001/dev60cgi/f60cgi?record=names

This will allow you to record your LoadRunner script and capture the Java Object names
that are generated from the Applet. The next step is to begin recording your script.
Launch the LoadRunner Virtual User Generator and select the multi-protocol script with
HTTP and Oracle NCA. When you select a new script it will prompt you for a URL. At
this URL you will put your Oracle Applications Home Page (Login Page). For our
example we will use (http://aderas.com:8001).

At the recording time you will also want to select the stage that you will record the script.
For most scripts you would want to start the recording in the vuser_init stage. Normally
you would record the login in the vuser_init because when you are doing a simulation
you would want to log on to the application once and then run through multiple iterations
of one of the forms. After you are completed with the login section, and launch the form
the LoadRunner tool will then switch automatically to recording the mod_jserv/Forms
applet activity with the Oracle NCA protocol. At this time it would also be helpful to
place transaction markers that will allow the tool to set its stopwatch on how long it takes
to launch the form or query a transaction. This is valuable information when using to
tool to simulate load, and measure how the application can scale under load.

Modifying the LoadRunner Script

After the initial script is recorded, there are a few tweaks to the script that need to be
completed before the script can be re-executed. The tweaks involve capturing the

© Copyright 2006 Aderas, Inc. All Rights Reserved 4


http://www.aderas.com
icx_ticket information and passing this to the forms launcher script. The icx_ticket is a
key that Oracle Applications uses for security and session consistency. This icx_ticket
number is generated by the system and then used when the forms applet window is
launched. In order to replay the LoadRunner Scripts we need to capture the icx_ticket
information when it is passed from the application server to the client via http, we will
then substitute this value as a variable to the forms launcher screen.

Below is an example of the script that has been recorded with the multi-protocol
http/NCA, in the vuser_init section.

vuser_init()
{

web_add_cookie("oracle.uix=0^^GMT-5:00; DOMAIN=aderas.com");

web_set_max_html_param_len("1024");

web_url("aderas.com:8012",
"URL=http://aderas.com:8012/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);

web_link("Apps Logon Links",


"Text=Apps Logon Links",
"Snapshot=t2.inf",
LAST);

web_link("E-Business Home Page",


"Text=E-Business Home Page",
"Snapshot=t3.inf",
EXTRARES,
"Url=../OA_HTML/cabo/images/cache/cghec.gif",
"Referer=http://aderas.com:8012/OA_HTML/AppsLocalLogin.jsp?requestUrl=APPSHOMEPAGE&cancel
Url=http%3A%2F%2Faderas.com%3A8012%2Foa_servlets%2Foracle.apps.fnd.sso.AppsLogin",
ENDITEM,
LAST);

lr_start_transaction("01_Login");

web_submit_form("fndvald.jsp",
"Snapshot=t4.inf",
ITEMDATA,
"Name=username", "Value=st_user_001", ENDITEM,
"Name=password", "Value=passwdstuser", ENDITEM,
LAST);

© Copyright 2006 Aderas, Inc. All Rights Reserved 5


http://www.aderas.com
lr_end_transaction("01_Login",LR_AUTO);

lr_start_transaction("02_Select_Responsibility");

lr_think_time(12);

web_link("INQUIRE AR CUSTOMERS",
"Text=INQUIRE AR CUSTOMERS",
"Snapshot=t5.inf",
LAST);

lr_end_transaction("02_Select_Responsibility",LR_AUTO);

lr_start_transaction("03_Launch_Form");

web_url("RF.jsp",

"URL=http://aderas.com:8012/OA_HTML/RF.jsp?function_id=3843&resp_id=50350&resp_appl
_id=222&security_group_id=0&lang_code=US&formsLink=yes",
"Resource=0",
"RecContentType=text/html",

"Referer=http://aderas.com:8012/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE&_ri=0&navRes
pId=50350&navRespAppId=222&navSecGrpId=0&_ti=186897096&oapc=2",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndewt.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndbalishare.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndctx.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndaol.jar", "Referer=", ENDITEM,
"Url=../OA_MEDIA/appslogo_new.gif", "Referer=", ENDITEM,
LAST);

web_url("fnd_icx_launch.runforms",

"URL=http://aderas.com:8012/pls/MMR1/fnd_icx_launch.runforms?ICX_TICKET=&resp_app=
AR&resp_key=CMS_INQ_AR_CUST&secgrp_key=STANDARD&start_func=AR_ARXCUDCI_QUICK
_VIEW&other_params=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t7.inf",
"Mode=HTML",
EXTRARES,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndforms.jar", "Referer=", ENDITEM,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndformsi18n.jar", "Referer=", ENDITEM,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndswing.jar", "Referer=", ENDITEM,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndlist.jar", "Referer=", ENDITEM,
LAST);

web_url("Registry.dat",
"URL=http://aderas.com:8012/OA_JAVA/oracle/forms/registry/Registry.dat",

© Copyright 2006 Aderas, Inc. All Rights Reserved 6


http://www.aderas.com
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);

web_url("OracleApplications.dat",

"URL=http://aderas.com:8012/OA_JAVA/oracle/apps/fnd/formsClient/OracleApplications.dat",
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);

web_reg_save_param("NCAJServSessionId",
"LB=",
"RB=",
"Search=Noresource",
LAST);

web_url("formservlet",

"URL=http://aderas.com:8012/forms/formservlet?ifcmd=getinfo&ifhost=aderas01&ifip=32.09.29.
124",
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t10.inf",
"Mode=HTML",
EXTRARES,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndutil.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/media/afclrall.gif", "Referer=", ENDITEM,
LAST);

nca_set_connect_opt(SCALE_INFO, 8, 21);

nca_connect_server("aderas.com", "8012",
"module=/d02/oracle/mmr1appl/fnd/11.5.0/forms/US/FNDSCSGN fndnam=APPS record=names
config='aderas_mmr1' icx_ticket='.1243142151' resp='AR/INQ_AR_CUST' secgrp='STANDARD'
start_func='AR_ARXCUDCI_QUICK_VIEW'::NLS_LANG='AMERICAN_AMERICA.WE8ISO8859P1'
FORMS60_USER_DATE_FORMAT='DD-MON-RRRR'
FORMS60_USER_DATETIME_FORMAT='DD-MON-RRRR HH24:MI:SS'
NLS_DATE_LANGUAGE='AMERICAN' NLS_SORT='BINARY'
NLS_NUMERIC_CHARACTERS='.,'");

nca_set_window("Navigator - INQUIRE AR CUSTOMERS");

nca_message_box_press("Forms", 1);

lr_end_transaction("03_Launch_Form",LR_AUTO);

© Copyright 2006 Aderas, Inc. All Rights Reserved 7


http://www.aderas.com
nca_win_close("Find/Enter Customers");

nca_set_window("Navigator - INQUIRE AR CUSTOMERS");

nca_list_activate_item("NAVIGATOR_LIST_0", "+ Customers");

nca_list_activate_item("NAVIGATOR_LIST_0", " Quick");

nca_message_box_press("Forms", 1);

return 0;
}

Locate the following line in the vuser_init section, assuming that you set the recording to
start in the vuser_init section.

web_url("RF.jsp",

"URL=http://aderas.com:8012/OA_HTML/RF.jsp?function_id=3843&resp_id=50350&resp_appl_id=222&security_group
_id=0&lang_code=US&formsLink=yes",
"Resource=0",
"RecContentType=text/html",

"Referer=http://aderas.com:8012/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE&_ri=0&navRespId=50350&navRespAp
pId=222&navSecGrpId=0&_ti=1865497096&oapc=2",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndewt.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndbalishare.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndctx.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndaol.jar", "Referer=", ENDITEM,
"Url=../OA_MEDIA/appslogo_new.gif", "Referer=", ENDITEM,
LAST);

Directly following this line add the following line to the script. This line will capture the
parameter passed from the application server so that we can later use this parameter to
pass to the launching of the applet window

web_reg_save_param("ICXTicket",
"LB=icx_ticket='",
"RB='",
"Search=ALL",
LAST);

© Copyright 2006 Aderas, Inc. All Rights Reserved 8


http://www.aderas.com
After the line is added, locate the following line and replace icx_ticket value with the
parameter. The change is highlighted below

nca_connect_server("aderas.com", "8012", "module=/d02/oracle/mmr1appl/fnd/11.5.0/forms/US/FNDSCSGN


fndnam=APPS record=names config='aderas_mmr1' icx_ticket='{ICXTicket}' resp='AR/ INQ_AR_CUST' secgrp='STANDARD'
start_func='AR_ARXCUDCI_QUICK_VIEW'::NLS_LANG='AMERICAN_AMERICA.WE8ISO8859P1'
FORMS60_USER_DATE_FORMAT='DD-MON-RRRR' FORMS60_USER_DATETIME_FORMAT='DD-MON-RRRR
HH24:MI:SS' NLS_DATE_LANGUAGE='AMERICAN' NLS_SORT='BINARY' NLS_NUMERIC_CHARACTERS='.,'");

Please note that you can change the name of the parameter to meet your desired naming
standard, I am using ICXTicket as an example. After this point you can continue to
customize your script to meet the needs of the scenario you are attempting to simulate.
The values that you entered can be replaced by parameters so that your script can be
simulate multiple user activities. When the changes are made you LoadRunner script
should now be able to replay without running into a “Session is no longer valid” message
that is launched when your original ICXTicket expires.

The table below shows the end result of the vuser_init section, I have highlighted the two
required changes.

vuser_init()
{

web_add_cookie("oracle.uix=0^^GMT-5:00; DOMAIN=aderas.com");

web_set_max_html_param_len("1024");

web_url("aderas.com:8012",
"URL=http://aderas.com:8012/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);

web_link("Apps Logon Links",


"Text=Apps Logon Links",
"Snapshot=t2.inf",
LAST);

web_link("E-Business Home Page",


"Text=E-Business Home Page",
"Snapshot=t3.inf",
EXTRARES,
"Url=../OA_HTML/cabo/images/cache/cghec.gif",
"Referer=http://aderas.com:8012/OA_HTML/AppsLocalLogin.jsp?requestUrl=APPSHOMEPAGE&cance
lUrl=http%3A%2F%2Faderas.com%3A8012%2Foa_servlets%2Foracle.apps.fnd.sso.AppsLogin",
ENDITEM,
LAST);

© Copyright 2006 Aderas, Inc. All Rights Reserved 9


http://www.aderas.com
lr_start_transaction("01_Login");

web_submit_form("fndvald.jsp",
"Snapshot=t4.inf",
ITEMDATA,
"Name=username", "Value=st_user_{UserNum}", ENDITEM,
"Name=password", "Value=passwdstuser", ENDITEM,
LAST);

lr_end_transaction("01_Login",LR_AUTO);

lr_start_transaction("02_Select_Responsibility");

lr_think_time(12);

web_link("INQUIRE AR CUSTOMERS",
"Text=INQUIRE AR CUSTOMERS",
"Snapshot=t5.inf",
LAST);

lr_end_transaction("02_Select_Responsibility",LR_AUTO);

lr_start_transaction("03_Launch_Form");

web_url("RF.jsp",

"URL=http://aderas.com:8012/OA_HTML/RF.jsp?function_id=3843&resp_id=50350&resp_appl
_id=222&security_group_id=0&lang_code=US&formsLink=yes",
"Resource=0",
"RecContentType=text/html",

"Referer=http://aderas.com:8012/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE&_ri=0&navRes
pId=50350&navRespAppId=222&navSecGrpId=0&_ti=1865497096&oapc=2",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndewt.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndbalishare.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndctx.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndaol.jar", "Referer=", ENDITEM,
"Url=../OA_MEDIA/appslogo_new.gif", "Referer=", ENDITEM,
LAST);

web_reg_save_param("ICXTicket",
"LB=icx_ticket='",
"RB='",
"Search=ALL",
LAST);

web_url("fnd_icx_launch.runforms",

"URL=http://aderas.com:8012/pls/MMR1/fnd_icx_launch.runforms?ICX_TICKET=&resp_app=

© Copyright 2006 Aderas, Inc. All Rights Reserved 10


http://www.aderas.com
AR&resp_key=CMS_INQ_AR_CUST&secgrp_key=STANDARD&start_func=AR_ARXCUDCI_QUICK
_VIEW&other_params=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t7.inf",
"Mode=HTML",
EXTRARES,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndforms.jar", "Referer=", ENDITEM,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndformsi18n.jar", "Referer=", ENDITEM,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndswing.jar", "Referer=", ENDITEM,
"Url=/OA_JAVA/oracle/apps/fnd/jar/fndlist.jar", "Referer=", ENDITEM,
LAST);

web_url("Registry.dat",
"URL=http://aderas.com:8012/OA_JAVA/oracle/forms/registry/Registry.dat",
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);

web_url("OracleApplications.dat",

"URL=http://aderas.com:8012/OA_JAVA/oracle/apps/fnd/formsClient/OracleApplications.dat",
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);

web_reg_save_param("NCAJServSessionId",
"LB=",
"RB=",
"Search=Noresource",
LAST);

web_url("formservlet",

"URL=http://aderas.com:8012/forms/formservlet?ifcmd=getinfo&ifhost=aderas01&ifip=32.09.29.
124",
"Resource=0",
"RecContentType=text/plain",
"Referer=",
"Snapshot=t10.inf",
"Mode=HTML",
EXTRARES,
"Url=../OA_JAVA/oracle/apps/fnd/jar/fndutil.jar", "Referer=", ENDITEM,
"Url=../OA_JAVA/oracle/apps/media/afclrall.gif", "Referer=", ENDITEM,
LAST);

© Copyright 2006 Aderas, Inc. All Rights Reserved 11


http://www.aderas.com
nca_set_connect_opt(SCALE_INFO, 8, 21);

nca_connect_server("aderas.com", "8012",
"module=/d02/oracle/mmr1appl/fnd/11.5.0/forms/US/FNDSCSGN fndnam=APPS record=names
config='aderas_mmr1' icx_ticket='{ICXTicket}' resp='AR/INQ_AR_CUST' secgrp='STANDARD'
start_func='AR_ARXCUDCI_QUICK_VIEW'::NLS_LANG='AMERICAN_AMERICA.WE8ISO8859P1'
FORMS60_USER_DATE_FORMAT='DD-MON-RRRR'
FORMS60_USER_DATETIME_FORMAT='DD-MON-RRRR HH24:MI:SS'
NLS_DATE_LANGUAGE='AMERICAN' NLS_SORT='BINARY'
NLS_NUMERIC_CHARACTERS='.,'");

nca_set_window("Navigator - INQUIRE AR CUSTOMERS");

nca_message_box_press("Forms", 1);

lr_end_transaction("03_Launch_Form",LR_AUTO);

nca_win_close("Find/Enter Customers");

nca_set_window("Navigator - INQUIRE AR CUSTOMERS");

nca_list_activate_item("NAVIGATOR_LIST_0", "+ Customers");

nca_list_activate_item("NAVIGATOR_LIST_0", " Quick");

nca_message_box_press("Forms", 1);

return 0;
}

© Copyright 2006 Aderas, Inc. All Rights Reserved 12

You might also like