Oracle Applications 11.5.9 Script Generation Utilizing Mercury Loadrunner™ by Jason Delano
Oracle Applications 11.5.9 Script Generation Utilizing Mercury Loadrunner™ by Jason Delano
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
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: [email protected]
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.
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:
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.
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
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);
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);
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",
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_message_box_press("Forms", 1);
lr_end_transaction("03_Launch_Form",LR_AUTO);
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);
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_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=
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);
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_message_box_press("Forms", 1);
lr_end_transaction("03_Launch_Form",LR_AUTO);
nca_win_close("Find/Enter Customers");
nca_message_box_press("Forms", 1);
return 0;
}