How to script Oracle 11i Apps on LoadRunner


A lot of people came to me on the last few weeks asking about Oracle Apps scripts. As I’ve been noticing during the last year, Oracle Apps (Financial) is dominating the ERP business and growing in a gigantic rate.

As I like to say, “Oracle is the new thing today”. Everybody is changing to Oracle, developing new solutions on their platform and I don’t have to say that also, creating new challenges for Performance Testing. For our luck, my opinion so far is that Oracle Apps do very well regarding performance if well designed and configured.

Obviously I’m not here to talk about Oracle Apps itself, with their search queries and concurrent requests. I’m here to give a few tips based on the things I learned while testing Oracle Apps.

Before I start, I just want to point that this is only one example of how things worked for me. If you’ve been on Performance Testing for a while, you should know that there are several ways of doing the same thing. Most examples were tested using LR 9.5 and Oracle 11i. I know that most tips can also be applied to LR 8.1, 9.1 and also Oracle 10.

Tip 1: How to correlate the Login?

Login is usually the tricky part of the Oracle Apps. The way I usually do is to use a multiple protocol script, HTTP and Oracle NCA. I know that the newer versions of LR have a specific protocol for Oracle Apps, but this has worked pretty well for me.

To make things easier, let’s record the steps from the web interface first. Don’t forget to add some comments, Each click on the web interface generates several requests and sometimes the same happens inside the application too.

All very simple so far. If you done the right things so far, LR should be capturing all events, both on the web interface and the Oracle interface. Once you’ve finished and LR generated the basic script, the tricky correlations come in.

On most cases, you will be using more than one application note. This means load balancing. In order to do this, the web front-end will send you a node name, port and domain.

To capture this information, use the following lines on the first request made when selected a form. Right before the “RF.jsp” call.

web_reg_save_param("serv_name", "LB=var xsname          = \"", "RB=\"", LAST);
web_reg_save_param("port_num", "LB=var xsport          = \"", "RB=\"", LAST);
web_reg_save_param("domain_name", "LB=var xdname          = \"", "RB=\"", LAST);

This will capture the required information for the load balancing. Now let’s concatenate this and create a connection string. Add this right after the “RF.jsp” call.

lr_save_string(lr_eval_string("{serv_name}{domain_name}"), "serv_name");

Now that we have the connection string, we need to capture some variables needed for the connection, like the form to be launched, some profile information, etc.

Right after the command above, add the following lines:

web_reg_save_param("nca_connect_1", "LB=<PARAM name=serverArgs    value=\"", "RB=  config='", LAST);
web_reg_save_param("nca_connect_2", "LB=var xform_params  = \"", "RB=\"\n", LAST);
web_reg_save_param("nca_connect_3", "LB=var xenv          = \"", "RB=\"\n", LAST);

Now that we have captured all information we need to connect, let’s change the connection line. Replace the “nca_connect_server” line to:

nca_connect_server("{serv_name}", "{port_num}", "{nca_connect_1} record=names {nca_connect_2}::{nca_connect_3}");

All done! Now you should be able to execute the Login correctly.

Tip 2: How to record the correct field names?

If you recorded a few scripts and you’re having problems with missing fields on second and subsequent interactions of your script, that’s probably because LR is not recording the filed names correctly. Oracle, depending on how it was configured, selects random field names depending on the interaction, usually plain numbers.

In order to solve that, you will have to change some configurations on your profile or default profile on Oracle. Obviously, you will need rights to change this information and usually to change the default profile, you will need the SYSADMIN user.

OK, all rights granted. Follow these steps:

  1. Open the Web Interface;
  2. Login with your user (or SYSADMIN);
  3. Select the role “System Administrator”. If you don’t have this role, you don’t have the rights to do this;
  4. Select the option “Profile: System”;
  5. Search for the following profile option: “ICX: Forms Launcher” (Search for a specific user to change only the settings for one user);
  6. Append this string to the end URL: “?play=&record=names”;
  7. Save and close everything;
  8. Try recording the script again.

ps.: Sorry if you already recorded all your scripts, you’ll have to do it again to get the field names right.

Tip 3: Other profile settings

These settings are not required, but are best practices gained though time. Change the following profile options the same way you changed the “ICX: Forms Launcher” option before:

ICX:Session Timeout: 3000s: Use this profile option to enforce an inactivity time-out. If a user performs no Oracle Applications operation for a time period longer than the time-out value (specified in minutes), the user’s session is disabled. The user is provided an opportunity to re-authenticate and re-enable a timed-out session. If re-authentication is successful, the session is re-enabled and no work is lost. Otherwise, Oracle Applications exits without saving pending work. If this profile option to 0 or NULL, then user sessions will never time out due to inactivity.

ICX: Limit time: 999h: Use this profile option to specify the absolute maximum length of time (in hours) of any user session, active or inactive.

ICX: Limit connect: 2000: Use this profile option to specify the absolute maximum number of connection requests a user can make in a single session.

Hope these tips will help you facing the “Oracle Challenge”!


Related posts:

  1. Creating Oracle 12 Scripts on LoadRunner
  2. How to Change the TimeOut on LoadRunner
  3. How to reset a terminal services session remotely
  4. Recording Citrix scripts on LoadRunner
  5. LoadRunner and IE8

, , , ,

  1. #1 by abvin - August 23rd, 2009 at 02:29

    Hi,

    I see that you are an expert with oracle applications and thought you would be able to resolve or suggest me the solution.

    I have an application that is Oracle web forms where login page is html and after authentication I get applet forms to work on.

    I tried to record scripts using Oracle NCA and Web (HTTP/HTML) and all my scripts run successful but now one of my company person contacted HP sales and they said I should be using Oracle click and script thats (Oracle Web applications 11i protocol) in that case company will not require to buy web (HTTP/HTML) protocol. I tried to record script with Web applications 11i protocol and see the code looks same that i got with NCA and HTTP but when I did edit my script similar to Oracle NCA it does not replay successfully. I am in a big trouble and want to know why it does not run? Its failing at login part itself.

    If I do not resolve this problem then I will have to explain them why I should not be using web 11i and should be using NCA and HTTP.

    Please email me on my email address abvinay@gmail.com

    Any suggestions would help.

    Thanks,
    abvin

  2. #2 by Martin - August 24th, 2009 at 19:18

    Hi Abvin, from my experience, if your application is 11i, using the multi-protocol approach is the best option.
    The problem with this approach is when your application is Oracle 12. The NCA protocol does not support Oracle 12 applications, that’s why HP suggests using the new protocol (11i Click & Script). It’s quite confusing, I know.
    If your problem is the license, with the new protocol you don’t have to use HTTP/HTML to record the Login part, but you will need another set of correlations to make it work.
    Is your application Oracle 11 or 12?

  3. #3 by abvin - August 26th, 2009 at 13:51

    Hi Martin,

    Thanks for your answers.

    My Application is Oracle 11 but as you said its true could become 12 in later releases.

    Is it possible for you to share an example or some explanation as what type of correlation would require for login part if I use only Oracle NCA?

    Thanks,
    Vinay

  4. #4 by Martin - August 26th, 2009 at 13:58

    HI Vinay,
    I’ve been doing some tests on Oracle 12 on the last couple weeks and I’m planning to write a post about it soon, with all required correlations and application changes in order to record a script from ground. Basically I’m using only the Oracle 11i protocol, correlating the ICX ticket and some JSession variables.
    Please check back for the complete post in a couple days.

    Cheers,
    Martin

  5. #5 by Chetan - October 2nd, 2009 at 10:48

    Hello Martin,

    Had you ever faced the problem in replaying the recorded Oracle 11i App. I have a E-Business Suite application and in a flow I have to search a field. The new search window is launched which LR is unable to handle (not identified). This new window has some dynamic values that not captured beforehand.

    I am using LR 9.10 / Jinitiator 1.3.1.18 / Oracle 11i.

    Let me know incase you need more details.

    Regards
    chetan

  6. #6 by Martin - October 2nd, 2009 at 14:03

    Hello Chetan,
    from my experience, if LR executed the connection correctly and you’re using Oracle NCA protocol, most errors like this occur because another window (probably a pop-up) is in focus and LR cannot find the window you specified by title.
    If this is not your case, send me more details about the problem (error messages, command, etc) so I can have a better idea about what is happening.

    Martin

  7. #7 by Chetan - October 9th, 2009 at 12:48

    Hi Martin,

    I am facing a new issue when trying to login (as mentioned in your steps above) on Oracle 11i.

    I get value for all the mentioned parameters, but when used with “nca_connect_server” it throw an error.

    Error details

    HTTP error occured: Server “XXX.XXX.XXX.com” has shut down the connection prematurely

    Warning -26000: Empty or no response for URL=”http://XXX.XXX.XXX.com:61048/forms/formservlet?JServSessionIdforms=946w9phax1.o7rAokSKbwTImleImBeImQXHcBSUahuNah0-”

    and

    ifError expired (5) during NCA handshake,

    Chetan

  8. #8 by Chetan - October 9th, 2009 at 13:34

    Skip the above message, it was resolved by handling JServSessionIdforms.

    But I am still unable to connect
    error :
    Warning: failed to receive data from the server

    Error: nca_connect_server: cannot communicate with host XXX.XXX.XXX.com on port 61048

    chetan

  9. #9 by Martin - October 9th, 2009 at 17:14

    Hi Chetan,
    are you capturing the server name and port from the http responses as I described on the post? What can happen sometimes is that Oracle returns the wrong port number on that variable. Check if 61048 is the correct port and if it’s not, set a static port number on the nca_connect_server call and try executing again.

    Cheers,
    Martin

  10. #10 by Gaby - February 9th, 2010 at 05:20

    Error: nca_connect_server: cannot communicate with host XXX.XXX.XXX on port 7778

    All correlation of sessions are in order. Using LR 9.51

    The server does not even see any attempt to connect, so I suspect Oracle NCA not configured correctly, and the request does not hit the server. Any tips how to trace further?

  11. #11 by Martin - February 11th, 2010 at 12:08

    Hi Gaby,
    what is the Oracle version? 11 or 12? I had some issues with 12, some additional parameters are needed.
    Also, in some cases, the port number returned by the Oracle server is wrong and I had to manually change it, ignoring the correlation and using a pre-defined parameter.
    Please let me know it this helps, otherwise I could check the code.

    Rgds,
    Martin

  12. #12 by sachin mishra - March 1st, 2010 at 01:33

    I am using LR 9.10 / Jinitiator 1.3.1.25 / Oracle 11i .But during recording IE crashes once I click on the link which opens the oracle forms. What happens in application is that when I click on that link it initiate downloading of some jar files and Jinitiator1.1.1.25, then it opens oracle form and also one another page which says applet started and message stating that ” closing this window will cause oracle based application to close immediately”. So while recording when I click on the link to open oracle form, IE(V 6.0) crashes and I am not able to record .

  13. #13 by Martin - March 1st, 2010 at 09:14

    Since we’re talking about Oracle Apps, my guess would be always remove any Java installs and also the current JInitiator and then try again. I can say that about 90 of the strange issue I had recording Oracle apps had something to do with the Java version and JInitiator. Try removing both and start fresh.
    Alos, does it work when LR is not recording?? I already faced a similar issue with an application where LR was interfering with a ActiveX control installed on the browser. If that’s the case, it could be interesting removing some unused ActiveX controls from IE6.

    Martin

  14. #14 by Sachin Mishra - March 3rd, 2010 at 05:59

    Thanks Martin I was able to record the oracle 11i but facing another issue. Oracle form is linked to 170 Markview solution. When I click on the oracle form, it opens a url which inturn download a plugin(activex plugin) for markview. while recording its starts downloading but do not open the markview page. Instead it gives error on browser stating object does not support property or method. This happens if I have tried to open it first time on a system. So if this plugin is already installed and then if I try to record it give an error stating that ” not able to open configuration file of plugin”

  15. #15 by Martin - March 3rd, 2010 at 17:36

    Does it work when you’re not recording with LR??
    If its working when you’re not recording, probably it is an issue between the ActiveX plugin and the LR recoding module. You can try a couple things if that’s the case:
    Recording it with another browser. This already happened with me. IE was crashing when recording and I had to record the script with Firefox, which uses a different plugin.
    If that doesn’t help, you can try changing the recoding mode to a lower level, like HTTP/HTML in URL mode (Options > Recording > URL-based Script)

    Martin

  16. #16 by pooja - March 12th, 2010 at 17:12

    Hi all,

    I am pooja, QA Tester. I am intrested in Load runner, so i gained some knowledge on it by browsing and reading some PDF’s online. since i am novice to this technology, can i handle LR with oracle 11i protocol. If yes, give the steps needed right from the scratch. I am ready to work thoroughly to gain knowledge and expertise in it.

  17. #17 by Martin - March 14th, 2010 at 12:55

    Hi Pooja,
    Always I have to give training to someone new to LoadRunner, I prefer starting with the basics, Web protocol, Google Searches, LR Tutorial, etc. If you’re learning on your own, I think the best approach would be starting with the tutorial that comes with LoadRunner. It covers all basic skills and also comes with its own web server and step by step guide.
    Oracle scripts are not difficult, but since you have to set some parameters and do some basic correlation, I believe starting with the LR tutorial would be the best option.
    To start scripting oracle apps you just have to create a new script, multi-protocol, web and oracle NCA and record the desired steps. After that you can just follow the correlations present on this post.

    Martin

  18. #18 by pooja - March 15th, 2010 at 18:42

    Thanks Martin.

    I will follow the approach you suggested.

  19. #19 by Vikas Singh - April 16th, 2010 at 01:57

    I have done B.com,PGDM(Finance & Marketing) and what want do Oracle 11i Apps (Finance) ?

    How it will help in my Career?
    As i am working with iGATE Global solution in Noida in Royal Bank Of Canda Process in Cash Investigation Team for last 18th month …

    Please Suggest me …………..Where i can get the job and what will me my job profile after doing this course…..

  20. #20 by Martin - April 28th, 2010 at 18:09

    Hi Vikas,
    let’s see if I understood you question correctly. You’re not working with IT and plan to take a course on Oracle EBS (Finance) and want to know how this can help your career.
    I’m not an expert on your field of work, but one thing I always advise people is to first make a plan (Short Term, Long Term) with your career objectives and then drill down to specific goals and then actions, like courses.
    Assuming you want to continue on your work field, but get a position on another company, the first thing I would do is to check the requirements on similar positions. If you already done that and noticed that Oracle is one of the requirements, I would check which modules are the most important and then get a course to have a better change of getting the position.

    Hope this helps.
    Regards,
    Martin

(will not be published)
  1. No trackbacks yet.