JAVA RMI Protocol in LOADRUNNER

1. When I clicked some links on the Web Application, I saw an applet showing ' "JAVA LOADING". This tells us that JAVA WEB START is used to launch an applet

2.JAVA WEB START could have been implemented with a HTTP or JNLP protocols
In this case the developers are using JNLP Protocol.

3.JNLP Protocol(Java Netwrok Launch Protocol)- Using Java Web start the stand alone Java application can be deployed with single click over the network. Java web start ensures the correct version of the Application and JRE are installed on the fly.

But the Loadrunner is not having that environment setup so it cannot record "Applet part of the application.

1. Get Developer fill the RMI/CORBA Qualifier

2.When the application is lanched, I found that the application jar files aresome where in my local machine. I copied them to a temporary folder called , "JARS"

4. Created a batch file to launch Loadrunner with below class paths

********************Batch files Start********

set Classpath = c:\Progra~1\Mercur~1\Merc~1\Classes;

c:\Progra~1\Mercur~1\Merc~1\Classes\srv;

c:\JARS\Mercur~1\file.jar...........all jarfiles;

set path = c:\j2sdk1.4.2_09\bin;

c:\Progra~1\Mercur~1\Merc~1\bin;

c:\winnt\system32\wbem;

c:\winnt;

c:\winnt\system32;

set -java_options = -xrunjdkhook-xbootclasspath/P:C:\progr~1\Merc~1\classes;C:\progr~1\Merc~1\Merc~1\classes\srv;

start VUgen
************Batch File End*********************

Application records Successfully but wont Replay

Why?

ToReplay run this Batch file
********************Batch files Start***********

set Classpath = c:\Progra~1\Mercur~1\Merc~1\Classes;
c:\Progra~1\Mercur~1\Merc~1\Classes\srv;
c:\JARS\Mercur~1\file.jar...........all jarfiles;
set path = c:\j2sdk1.4.2_09\bin;
c:\Progra~1\Mercur~1\Merc~1\bin;
c:\winnt\system32\wbem;
c:\winnt;
c:\winnt\system32;
start VUgen
************Batch File End*********************

Now I could able to replay the script successfully
NextI have to enhance the script-
Here when I launched the application it is Web then omesto Java applet.
to run the script using Loadruner-JAVA RMI Protocol, I have to convert the Recorded Web Piece of code in the loadrunner script in to JAVA.
I did the following experiments
1. Handling the Web Part: When applicatis launched through the Web, some tokens are used. I have to correlate those tokens fisrt. To do that I recorded again the application in with Loadrunner Web(HTML /HTTP) Protocol and correlated with classic Web_reg_save_param function.
2. Then converted that code of the web Script in to Java and appended it at the top of the script I recaorded earlier with JAVA RMI Protocol.
3. How did I convert the Web Script to JAVA?..... Record the appliation in Web Protocol. Copied the code in text file. In the command prompt I used SED utility
**************************In the CMD Prompt***************
loadrunner/bin/>sed-f web_to_java.sed c:tmp/web.txt>c:/tmp/java.txt
but error occured. then tried
loadrunner/bin>sed -f lrconvertweb.sed c:/tmp/web.txt >c:tmp/java.txt
again error
Then I made sure Loadrunner\bin is in the systems path environment. Then I opened command line and tried following
sed -f web_to_java.sed c:/tmp/web.txt >c:tmp/java.txt
It worked successfully
I copied the content of the java.txt and appended at the top of the Loadruner script recorded in JAVA RMI Protocol.
Then I paramerized the token numbers and used it to handle the correlation in the JAVa RAMI Script.
Then Make these changes to the Runtime settings because the Internet Protocol section is missing in the JavaRMI Scipt. I tried the following:

1. Close VUGEN--- Goto ,LoadRunner>dat\protocols, There edit the .lrp file

2. Locate the the[VUGEN] Section, for the data for CFG_TAB_DLL=, add a comma and LRW Runtimesettingd UI.dll to it.

3. To put Text checks in JAVA RMI Script( similar to WEB_reg_find in Web Protocol) I wrote some Java code to validate the Transactions

For example: In the Script When user click a button, the server genrated confirmation number is found in JMS.txt inVugen folder. I could not find it in the recorded script. It should be captured to validate the Transaction. I wrote some Java code to validate. Here the application is using"JMS Messaging with call back section.

My experiments before recording:

1. Manually Launched the application

2. Install Correct version of JDK.---but not starting

3.Tried deleting the folders created by previous launch. It started

4.If not, comment out the -java_options in the environment varialbes/classpath. also remove -xrunjdkhook from the Java environment parameters given in java plugin options
It will start successfully. If not the browser crashes

5. I saw cache exception in Java console while launching the application. Then I unchecked enacle caching in JavaPlugin from control pannel

These are the experiments I did with Load Runner RMI Protocol. I hope these experiments will help some one in working with Loadrunner JAVA RMI Protocol.

No comments:

Post a Comment