Oracle NCA Protocol Example Scripts

In the following example, the user selected an item from a list (nca_list_activate_item), pressed a button (nca_button_press), retrieved a list value (nca_lov_retrieve_items), and performed a click in an edit field (nca_edit_click). The logical names of the objects are the parameters of these functions.

nca_lov_select_item("Responsibilities","General Ledger, Vision Operations");
nca_list_activate_item("FNDSCSGN.NAVIGATOR.LIST.0","+ Journals"); 
nca_list_activate_item("FNDSCSGN.NAVIGATOR.LIST.0"," Enter"); 
nca_button_press("GLXJEENT.TOOLBAR.LIST.0"); 
nca_lov_find_value("Batches",""); 
nca_lov_retrieve_items("Batches",1,9); 
nca_lov_select_item("Batches","AR 1020 Receivables 2537: A 1020"); 
nca_edit_click("GLXJEENT.FOLDER_QF.BATCH_NAME.0");

In certain tests, such as those performed on Oracle Configurator applications, information returned by one function is required throughout the session. VuGen automatically saves the dynamic information to a parameter by inserting a web_reg_save_param function into the script.
In the following example, the connection information is saved to a parameter called NCAJServSessionID. The right boundary is \r. The actual right boundary may differ between systems.
web_reg_save_param ("NCAJServSessionId", "LB=\r\n\r\n", "RB=\r",
       LAST);
web_url("f60servlet",         
         "URL=http://usscifforms05.sfb.na/servlet/f60servlet\?config=mult",
         LAST);

Oracle NCA Protocol Example Scripts


In the following example, the user selected an item from a list (nca_list_activate_item), pressed a button (nca_button_press), retrieved a list value (nca_lov_retrieve_items), and performed a click in an edit field (nca_edit_click). The logical names of the objects are the parameters of these functions.
... 
nca_lov_select_item("Responsibilities","General Ledger, Vision Operations");
nca_list_activate_item("FNDSCSGN.NAVIGATOR.LIST.0","+ Journals");
nca_list_activate_item("FNDSCSGN.NAVIGATOR.LIST.0","       Enter");
nca_button_press("GLXJEENT.TOOLBAR.LIST.0");
nca_lov_find_value("Batches","");
nca_lov_retrieve_items("Batches",1,9);
nca_lov_select_item("Batches","AR 1020 Receivables 2537: A 1020");
nca_edit_click("GLXJEENT.FOLDER_QF.BATCH_NAME.0");
...
In certain tests, such as those performed on Oracle Configurator applications, information returned by one function is required throughout the session. VuGen automatically saves the dynamic information to a parameter, by inserting a web_reg_save_param function into the script. In the following example, the connection information is saved to a parameter called NCAJServSessionID.
web_reg_save_param ("NCAJServSessionId", "LB=\r\n\r\n", "RB=\r",
       LAST);
web_url("f60servlet",         
         "URL=http://usscifforms05.sfb.na/servlet/f60servlet\?config
         =mult",         LAST);
In the above example, the right boundary is \r. The actual right boundary may differ between systems.

Loadrunner And Oracle Part1

Introduction

This is part 1 of an article which discusses some of the mechanisms for performance testing Oracle Applications / Oracle Forms using LoadRunner. This is far from an in-depth article but will, we hope, help performance testers get started with testing Oracle Applications and act as a reference resource. The article as a whole covers two key areas that seem to present the most issues, Object Names and Connect issues, as well as some other issues that we at Testing Performance have come across when delivering our Performance Testing Services. Part 1 covers Object Names issues.

Object Names

One of the first issues you will come across when recording an Oracle Application is that Oracle objects are recorded by a number rather than a name. These numbers are dynamic and cannot be relied upon when playing back a script, i.e. the object cannot be found by LoadRunner as its “number” has changed.

Here is an example of objects recorded by their object number (this is part of a login script that was recorded using Oracle Applications 11i protocol against an Oracle Forms application):

nca_edit_set(“31”, ”USERNAME”);
nca_obj_type(“31”, ‘\t’, 0);
nca_edit_set(“32”, (”PASSWORD”));
nca_obj_type(“32”, ‘\t’, 0);
nca_edit_set(“33”, ”TRAINING”);
nca_button_press(“34”);

This script refers to four objects 31, 32, 33 and 34. If these objects do not change their number between recording and execution then the script should run OK. However these numbers are subject to change for example if a new field is added on the form between object 33 and object 34 then the nca_button_press(“34”) would fail as would now probably known as 35. To get round this issue Oracle offers the “RECORD=NAMES” method which associates a name to each object rather than a number. The name is very much more likely to remain static.

Here is the same example as above except the objects were recorded by their object name (this is part of a login script that was recorded using Oracle Applications 11i protocol against an Oracle Forms application):

nca_edit_set(“LOGON_INFO_USER_NAME”, ”USERNAME”);
nca_obj_type(“LOGON_INFO_USER_NAME”, ‘\t’, 0);
nca_edit_set(“LOGON_INFO_USER_PASSWORD”,(”PASSWORD”));
nca_obj_type(“LOGON_INFO_USER_PASSWORD”,(””, ‘\t’, 0);
nca_edit_set(“LOGON_INFO_USER_DATABASE”,(””,”TRAINING”);
nca_button_press(“LOGON_INFO_CONNECT_BUTTON”);

By default, in all the engagements that I have been involved in at least, Record=Names is not enabled. So how do you enable Record=Names? Here are four methods for achieving this, three of which require a configuration change and one which is very simple. I have found that finding the correct method is very much a “suck it and see” methodology.

Before trying the following just make sure that your installation records numbers instead of names by recording a simple logon script.

Method 1: Append to URL

This is very much the simplest method and should be tried first.

Below is the Start Recording dialog presented when recording using the Oracle Applications 11i protocol. The URL in this case is:

http://apps.acme.co.uk:7778/forms/frmservlet?config=2001

Figure 1

Try appending record=names to the end of the URL, for example:

http://apps.acme.co.uk:7778/forms/frmservlet?config=2001&record=names

Figure 2

Note if record=names is the first parameter to be added to the url then you will need a question mark before it eg:

http://apps.acme.co.uk:7778/forms/frmservlet?record=names

If however there are one or more parameters already in the url then you will need the ampersand prefix eg:

http://apps.acme.co.uk:7778/forms/frmservlet?config=2001&record=names

Now try and record a simple login script, if the object numbers are replaced by object names then you are in business. You should also notice that the record=names flag is appended to the connect_server statement.

Note: This method worked with the following configuration:

Oracle Forms version: 1012002
LR Protocol: Oracle Applications 11i
LR Version: 9.5
Jinitiator version: 1.3.1.28 (not overly important)

Method 2: Set record=names in startup file

This method requires a change to the HTML startup file on the forms server. Tracking which file to change can be a bit tricky if someone has renamed the appropriate file, which they are quite entitled to do. The file you are looking for is the one that is called when the forms applet starts. This file holds configuration details for the forms applet. By default the name of the file is basejini.htm.

The file contains a number of configuration entries.  The line you are interested in is something like this:

<PARAM name="serverArgs ... ... ... fndnam=APPS">

[param name="”serverArgs" fndnam="APPS”" /] Note there may be a number of entries which replace the ellipses (…) above.

Append record=names as the last argument i.e.: [param name="”serverArgs" fndnam="APPS" record="names”" /]

<PARAM name="serverArgs ... ... ... fndnam=APPS record=names">

Note: there is a space between the fndnam=APPS argument and record=names.

Now try and record a simple login script, if the object numbers are replaced by object names then you are in business. Note: This method worked with the following configuration:

Oracle Forms version: 60824
LR Protocol: Oracle Applications 11i
LR Version: 9.5
Jinitiator version: 1.1.8.16 (not overly important)

Method 3: Set value in formsweb file and HTML start-up file

I have had to use this method less often than the previous two methods. This method should be used if the HTML start-up file references the Forms CGI configuration file.  This method requires two files to be changed.

The Forms CGI configuration file in question is formsweb.cfg (it may have been renamed but probably not).

You will need to add a new entry in this file under the USER PARAMETERS in the section: “Values for Forms applet parameters”. Add the following as the last entry in this section:

xrecord=names

Your file should look something like this:

connectMode=socket
serverHost=serv1.acme.co.uk
xrecord=names

;4) Parameters fo Jinitiator

In the HTML start-up file basejini.htm (or whatever its name has been changed to) there are a number of configuration entries.  The lines you are interested in go something like this:

<PARAM name="serverArgs ... ... ... fndnam=APPS">

[param name="”serverArgs" fndnam="APPS”" /] Note there may be a number of entries which replace the ellipses (…) above.

Append record=%xrecord% as the last argument i.e.: [param name="”serverArgs" fndnam="APPS" record="%xrecord%”" /]

<PARAM name="serverArgs ... ... ... fndnam=APPS record=%xrecord%">

Note 1: there is a space between the fndnam=APPS argument and record=%xrecord%.
Note 2: there may be more than one entry in the HTML start-up file that needs to be changed

Method 4: Oracle Applications record=names flag

If you can access the Oracle Applications System administrator then you can change the profile of the users via the Profile System Values panel and appending ?play=&record=names to the ICX:Forms Launcher. At this time I have no screen shots for this process but please feel free to contact Testing Performance ( info@testingperformance.co.uk) should you need assistance and we will do our best to provide a more indepth procedure.
 

Part 2 coming soon!

Part 2 of this article covers Connect issues and other issues that you may encounter when doing performance testing with Oracle NCA– look out for it!
Remember if you need help with any Performance Testing Services please feel free to contact us.

Multi-Protocol (Oracle NCA/Web) Tips & Tricks