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

Welcome To Loadrunner Helpline By Bhupendra Varshney

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.....