Monday, July 2, 2012

Loadrunner Interview Questions and answers?

1. Why should we automate the performance testing?

It’s a discipline that leverages products, people and processes to reduce the risk of application upgrade or patch deployment. It is about applying production work loads to pre-deployment systems while simultaneously measuring system performance and end-user experience.

2. What are all the things will be considered while doing performance testing?

Does the application respond quickly enough for the intended users?

Will the application handle the expected user load and beyond?

Will the application handle the number of transactions required by the business?

Is the application stable under expected and unexpected user loads?

Are we sure that users will have a positive experience on go-live day?

3. What are the LoadRunner components?

Virtual User Generator


Load Generators


4. What is the LoadRunner testing process?

Plan load test

Create Vuser Scripts

Define Scenario

Run Scenario

Analyze results

5. What is remote command launcher?

The remote command launcher enables the controller to start applications on the host machine

6. How you develop the database vuser script?

Developing the database vuser script either by recording with load runner vuser script generator or by using load runner vuser script template.

7. How you load a load runner Agent?

While running the scenario loadrunner controller instructs the remote agent dispatcher to launch loadrunner agent. The controller instructs the loadrunner agent to initialize, run, pause and stop the vusers.

8. What is the difference between hits/second and requests/second?

Hits per second means the number of hits the server receives in one second from the vuser and the request per second is the no. of request the vuser will request from the server.

9. What are the reasons why parameterization is necessary when load testing the Web server and the database server?

Parameterization is useful for performance scripts for various reasons: -

1. We can use different data in scripts dynamically.

2. When URLs of AUT are parameterized, it becomes easy for the script to point to different application environments, i.e. Dev, QA or Prod depending upon the requirements.

3. Parameterizing helps in emulation real scenario as it avoids caching effect, if we send same data again and again while running scripts in iteration, then the data could be used from cache or from the temporary table from the database. Now if we send different data in each iteration the real performance transaction timers can be measured.

10. What are the advantages of using load runner?

Advantages are:-

1. With help of vusers reduces the human users

2. Reduces the requirement of the systems

3. Helps in the better usage of time and money

4. Effective utilization of automation

5. Everything done from a single point

11. What is the vuser in the scenario?

The vuser is virtual users nothing but those who simulate the real users. The virtual users who take the place of real users operating client software, such as IE sending requests using the HTTP protocol to IIS or Apache web servers

12. What is the difference between stop and gradually stop?

When you want to stop all the Vusers at once, this is called stop the Vusers at once. It is done in the scenario schedule section of the controller window. Suppose you want to stop the Vusers gradually, then you have to set the Vusers stop gradually. It is done in the scenario schedule section panel of controller window in loadrunner.

13. Explain the Load testing process?

Step 1: Planning the test. Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives.

Step 2: Creating Vusers. Here, we create Vuser scripts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.

Step 3: Creating the scenario. A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.

 Step 4: Running the scenario.

We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.

Step 5: Monitoring the scenario.

We monitor scenario execution using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors.

Step 6: Analyzing test results. During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunner’s graphs and reports to analyze the application’s performance.

14. What Component of LoadRunner would you use to record a Script?

The Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.

15. What Component of LoadRunner would you use to play Back the script in multi user mode?

The Controller component is used to playback the script in multi-user mode. This is done during a scenario run where a vuser script is executed by a number of vusers in a group.

16. What is a rendezvous point?

You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.

17.  What is a scenario?

A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.

18. How can a LoadRunner script be debugged?

Breakpoints and the Run Step-by-Step features of VuGen can be used for debugging and this information is written in the output window. There are debug settings in the Options area that allow the user to set the specifics about the trace that is performed during the execution of the scenario.

19. How does one write a user defined function in LoadRunner?

When creating a user-defined function, one must first create the external library that contains the function. This library must then be added to the bin directory of VuGen. Next, the user-defined function can be assigned as a parameter

20. Which function is used to capture dynamic data in the web Vuser script?

Web_reg_save_param is the function that saves dynamic data to a parameter.

21. What are the changes that can be made to run-time settings?

There are four run-time settings that can be made:

Pacing: This contains iteration count.

Log: This is where logging can be set to standard or disabled.

Think Time:  Capable of setting think time to be ignored or replayed.

General:  Allows the setting of Vusers for processes or multithreading.

22. How can web server related issues be found?

Web resource monitors can be used to find server related issues.  These monitors are capable of analyzing web server throughput, volume of hits per second during the execution of the scenario, the number of pages downloaded per second, and the volume of responses per second.

23. How can database related issues be found?

Monitors and the Data Resource Graph can be used to find database related issues. LoadRunner allow the tester to specify the resource that is to be measured before the controller is run.

24. What are the types of options are available for goal-oriented scenarios?

There are five goal options available:

Number of Vusers (concurrent)

Number of transactions/second

Number of hits/second

Number of pages/minute

Transaction response time

25. How many types of graphs are available in LoadRunner and what are they?

There are 5 types of graphs:

Network delay time graph – displays the time the elapses between request and response

Two transaction response time graphs – one for load and one for percentile

Hits/second graph – Shows application traffic volume.

Pages download/second graph – shows the rate that download processes are performed

26.. How can performance bottlenecks be identified?

LoadRunner has monitors that can be used to detect performance bottlenecks. These include network, web server, application server, and database server monitors. These monitors can be used to locate trouble spots in scenarios that cause increases response time and they track throughput, network delays, performance response time, hits/sec, etc.

27. How can one tell when correlation can be performed?

There are two ways to do this. One is to use the scan function to search for correlations and select a value from the resulting list. The second is to record a pair of scripts and then compare them to each other.

28. Where are automatic correlation options set?

The automatic correlation is set in recording options area on the correlation tab. From here, correlation can be enabled for the full script and rules for correlation can be defined.   Automatic correlation can be performed on a database by viewing the output window, scanning for correlation, and selecting the value that will be used.

29. Where is the number of iterations set for testing with Vuser scripts?

The number of iterations is set in the VuGen pacing tab in the Run-time settings area.

30. What is ramp up and how can it be set?

Ramp up is gradually increasing the load on a server.  This is simulated by gradually increasing the number of Vusers.  This feature can be found in the Scenario Scheduling Options.  When used, the initial value and the time to wait between periods are specified.

31. What is the benefit of running a Vuser script as a thread?

The advantage of running a Vuser script as a thread is that it allows more Vusers to be used for one load generator. Running Vuser scripts as processes utilizes a lot of memory because all of the loaded scripts use the same driver.  This limits the number of Vuser scripts that can be run on one generator.

32. How do you set LoadRunner to stop script execution when an error occurs?

Execution of Vuser scripts can be stopped on error using LoadRunner’s lr_abort function. The “Continue on error” option must not be checked in the Run-Time Setting menu.  It is helpful when it is necessary to abort execution when a certain error condition occurs. This function instructs the Vuser to stop performing what is in the Actions section, and to begin performing the vuser_end functions.  When execution is terminated, the Vuser status is changed to “Stopped”.

33. How are throughput and response time related?

The graph for throughput displays the quantity of data that the server sent to the Vusers in one second. When throughput is compared to the response time of transaction, it decreased as the response time decreased. In addition to this, the highest throughput and response times occur at approximately the same time.

34. Define think time and explain how you change the threshold for it.

Think time is the interval of time that a user must wait between actions. An example of this is the time that a user takes to review data after receiving it from the server before responding to it.  The threshold is the maximum level at which this time will be ignored.  The default threshold value is five seconds but this can be modified in the VuGen Recording options.

35. Explain the difference between standard and extended log?

The standard log contains a subset of functions and messages, which vary based on the type of Vuser, which are generated during the execution of a script. The extended log creates a more detailed listing of functions and messages.

1 comment: