Loadruuner Helpline by Bhupendra Varshney, Loadrunner Help online, Loadrunner issues

Welcome To Loadrunner Helpline By Bhupendra Varshney
Showing posts with label What is correlation in Loadrunner. Show all posts
Showing posts with label What is correlation in Loadrunner. Show all posts

Monday, May 2, 2011

VU Gen (Virtual User generator) Cond...

FAQs

In order to record a script in VU Gen one may ask few questions about scripting. I am mentioning below some of most frequently asked questions in VU Gen script recording -

Question 1) What is a VUGen script?
 Answer   :   A VUGen script is end-to-end functionality (business flow) of an application, recorded by Loadrunner's component VUGen. Some people call it a "session" in other tools.
Question 2) Which language is used in script recording in LR?
Answer   : VUGen script is recorded in C Language.

Question 3) What is a length of a script?
Answer : Tength of a VUGen script varies from application-to-application, and business process length.

Question 4) What is the extension of a VUGen script file?
Answer : .usr ("dot usr")

Question 5) What is important in VU Gen scripting?
Answer : The flow that you are recording in VUGen is important. Because in some cases it has been observed that the client refuses to accept the result of a performance test stating- this is not what we expected to test. So planning of business process scenarios (flows or functionalities) is the key element of VUGen script recording.

Question 6) What is the cost of VUGen?
Answer:  It's Free. As the VU Gen is a component of Loadrunner that comes with the evaluation version and that too free. The license key is required for the use of Load controller. However, Load controller comes with an evaluation version for 10 days.

Question 7) Is VUGen scripting simple or difficult.
Answer: It is not simple until you initiate it and it is not difficult if you do it.

Question 8) What is correlation in Loadrunner and why correlation is important?
Answer: Correlation is used to capture dynamic values returned from the server. Every iteration requires
              some unique dynamic values that can only be captured using correlation.

Question 9) What are run-time settings in VUGen?
Answer : Run-time settings are configuration settings that to be done before running a script but for during
               run. These settings are simulation settings for a script. For example - You can simulate the
              browsers that are not available on your client machine. You can simulate number of itereations,
              network bandwidth etc.

Question 10) While running the VUGen script, I am not able to see the browser. How can I see that, and what term is used to call that browser?
Answer : The browser that can be watched during every step of your script, is called as "run-time 
                browser". By default it is disabled after fresh installation of VUGen.
               To enable it go to - Tools -- > General Options-- > Display Tab -- >
               Check "Browser during display"--  > Click OK button
               See the below image for quick glimpse.


Tuesday, April 26, 2011

VU Gen (Virtual User generator)

Hello Friends,

The wait is over now. After a long span of 1 year, upon many of my follower's request through mail, I am back with new ideas on treasures of Loadrunner. Before start explaining the concept of VU Gen, I would request you to please read out my previous two blogs on Web Performance Testing and Components of Loadrunner.... Uhhhh....typing up whole Loadrunner is too lengthy..is'nt it?? So we will refer LR to Loadrunner... :-)....

VUGen is a component of LR used to perform the recording a script. A script is nothing but an end-to-end functionality of a business process. But the question is how to find out the optimum script flow for an application and who provides that, are the key questions one may raise. I will cover this in Performance Test Planning. For now I will put more light on the script flow.

Let's take an example of a third party transfer functionality of net-banking application (of course web application in our context) to more understand the end-to-end functionality. In a net-banking application, the user will first type in the URL in the address bar of Web browser. After page appears he will login to the application and will be able to see his main page. Next he will go to Fund Transfer (term may vary for different websites) and then he will select third party transfer (with-in bank) and  then he will select 1) "from account" from dropdown (source account from which the fund has to be transfer), 2) To account (destination account beneficiary) and then he will enter the amount in the Text box and then click Pay button. He will get the success message from the server for the transaction. (some must be thinking what if the transaction fails, then the answer is - we always record the script with functionally valid build and valid data). After that the user will Logout.


Actions

So on nutshell, the script's steps (flow) will be as follows -


Home Page-->Login button--> Fund Transfer--> Third party transfer Link -->Submit Details Button --> Logout

Here the above six flows are called as six actions of third party transfer script. After we are done with the identification of the business flows we will start recording the script.

Parameterization:

The above steps of a script are captured in separate section (as a function) in the VUGen. After we record the script, we select for the static values (the values which a user has to enter manually). These static values will then be parameterized in order to simulate  the multi-user load (for example for 100 user test we have to parameterize User ID and Password field and save the parameter file (dat file) with 100 different User IDs and Password.

After we are done with parameteization we will start correlation.

Correlation

Correlation is the core of the scripting. When we record the script, some dynamic values (generated by the server dynamically) are recorded and hard-coded in the script which need to be correlated so  that it gets changed for every iteration. The example of such dynamic values are -Session ID, UID, SID, JSession ID..the IDs which are unique for a single iteration and gets expired with the session of a user.

One function fulfills this need of correlation -

web_reg_save_param("Parameter Name",
"LB=Left Boundary",
"RB= Right Boundary"
"ORD=Ordinal on which the value falls",LAST);



Content Check


After correlating the dynamic values, we check for the success of our page. We find out some string (text) on the page which appear on the success of an action. For example, when we logout from the appilcation, an appilcation gives a message - "You have been successfully logged out".
 
We will set this value to be a symbol of pass criteria of our transaction (will explain you later).
 
This content check will be  used for error handling of our script.
 
One function is used for this -
 
web_reg_find("Text=Text To Be find");
 
Think Time


Think time is the time a user takes to think while performing some action (enter detail, clicking a button etc);

We use the following function for applying  the think time between two transactions.

 lr_think_time("number");

To be continued.....



Thursday, April 15, 2010

VuGen-Installation : How to install only VU Gen

Today, I am going to start off with the installation of VUGenerator (VUGen) of evaluation version of Loadrunner 9.0.

Firstly check your systems configuration and minimum resource requirement as below-

1) Processor              -  Not less than PIII (1 GHz) And recommended is PIV (2.4 GHz)
2) Operating Systems -  Windows 2000 (SP 4) or more; Unix- Solaris 9 (2.9) and 10 (2.10), HP-UX 11i V2, IBM AIX 5.2 and 5.3, RedHat Linux Advanced Server 3.0
3) RAM                    -  1 GB
4) HDD                     - 2 GB

 Tip: For seamless installation close the antivirus (specially McAfee or Aladdin's eSafe anti-virus) if installed on your machine.

After having the verification of the above required specifications, run the installer exe and you will see the below screen-




Here click the Loadrunner full setup option to install the VUGen and keep following the instructions.
Click Next while you are prompted to install the pre-requisites for Loadrunner VUGen and agrre the terms and conditions thereafter.

After installation of prerequisites, you will be asked for selecting the type of installation. Just select "Custom" installation because we donot want to install the complete setup but VUGen.

Then you will get few options to select from. Just select "VUGenerator" and click Next. And keep clicking on Next button untill Finish.

 Note:- Please do not select Controller option otherwise you have no chance to format your system after 10 days, since the license is required only for LR controller and not VUGenearator.

After complete installation you will get the following screen-

Figure 2 - Startup screen






Here we are all set to start the recording of our script. Folks, if you are prompted to enter the license key after installation, just cancel without even bothering :)..Its not going to hamper your practice anymore..;) 

We will take the recording in later part... Till then you play with the installation of LR VUGen... Or if your machine is not equipped with the minimum requirements for installation, just start upgrading  that. :)

Till then chao...

Wednesday, April 14, 2010

Introduction To Web Performance Testing

To start with, A web performance means different to different stakeholders (client, Business Analyst, Architect, Manager, Developer and testers). Overall, in the current scenario, a web's performance is analyzed by the response time (or page response time, or transaction response time).
The response time is the time taken by a HTTP page to appear to the end user (a person who actaully is browsing the web applciation).

This is obvious that for a layman the above definition is appropriate, but when we come to the broader one, we cannot set a gamut for it. For instance, an architect would be looking for the design pattern bottlenecks, the topology and network bottlenecks. A DBA would be interested to analyze the performance related to database parameters like- Long running queries or stored procedures, blockings (lockings), deadlocks, indices etc... A developer would be interested in finding out the bottlenecks in his own module/group of modules for the response time point of view (irrespective of the background processing in the environment)....A client would only like to know wheter his applciation is able to handle the specified number of user load and all the benchmarking parameters are as per the Service Level Agreement (SLA).
Whereas a tester has to look upon from bottom to top view of performance parameters... Unlike other stakeholders, he has to see all the covering parameters cater to the performance of application...

This was just an introduction on what actually a web performance means for a layman...and how its definition varies from person to person.