Showing posts with label Load Runner. Show all posts
Showing posts with label Load Runner. Show all posts

Load Runner; Introduction

Load Runner

Introduction

To test the performance requirements such as transaction response time of a database application or response time in the case of multiple users accessing a web site, Load runner is an excellent tool that reduces the infrastructure and manpower costs.

Mercury interactive Load Runner is used to test the client/ server applications as database management systems and web site. When multiple users access the application requires lot of infrastructure and manpower, if testing are not used. Using load runner, with minimal infrastructure and manpower, performance testing can be carried out.

Load Runner simulates multiple transactions from the same machine and hence it creates a scenario of simultaneous access to the application. So, instead of real users, virtual users are stimulated. With virtual users simultaneously accessing the application, load runner accurately measures and analyzes the performance of client/ server application.

In Load Runner, we divide the performance testing requirements into various scenarios. A scenario is a series of actions that are to be tested. Load runner creates virtual users. The Vusers submit the request to the server. Vuser script is generated and this script is executed for stimulating multiple users.

For demonstrating the features of load runner, we will use an application “weather India” which gives information about the weather of various cities in India. It is a web based application with hyperlinks such as weather basics, weather phenomenon, and weather forecasting.






Creating vuser script using virtual user generator

Load Runner

Creating vuser script using virtual user generator

For creating the v-user script, follow the following steps:

  1. Start the virtual user generator.
    START> PROGRAMS> LOAD RUNNER> VIRTUAL USER GENERATOR.
  2. Load runner displays the welcome screen.
  3. Click the new single protocol button. It displays the list of protocols. Select the category under which the application to be tested falls. In case of our example, select the web (http/html) option and click OK button.
  4. When you click the ok button, it displays the dialog.
    The virtual user script is divided in to 3 sections:
    • Vuser_init: These actions are performed when the vuser is loaded or initialized.
    • Actions: These actions are performed when vuser is in “running” state.
    • Vuser_end: These actions are performed when the vuser finishes or stop.

You can select the section before or while recording is under progress.

  1. Select the actions section. Click the start record button or select the “start recording” option from the vuser menu.
  2. On selecting “start recording” option, it displays the start recording dialog. This prompts to you to enter the “URL” of the application for which the test has to be performed. Enter the URL and select the action section from the record into action combo box and click OK button.
  3. Load runner now opens the specified URL and a recording toolbar appears. Load runner is now in the recording mode. Perform the actions that are to be recorded such as clicking on a link to obtain the wether information for particular city. Once all actions are recorded, stop the recording by clicking the stop button in the recording toolbar.
  4. Load runner generates the script for the actions that are recorded. Vusers scripts can be generated by using a number of tools such as win runner, VuGen, Quick Test etc. which together form a testing suite of mercury.
  5. Save the test.
    FILE> SAVE
  6. Run the script.
    Click the arrow button to run the test script or click “run” from Vuser menu or press F5. VUSER> RUN.
  7. The test results are displayed in the test results window which contain various sections: “Vuser_init_summary”, “iteration”, “Vuser_end_summary”.

The result summary report will be displayed.






Creating Virtual users using load runner

Load Runner

Creating Virtual users using load runner

Load runner controller is used to create the virtual users who replace the human users to test the performance of the application. By default, it creates virtual users who will access the application simultaneously and test the load on the application. It is also possible to increase number of virtual users. Let us now create virtual users for the web based application for which we have already generated the test script using the load runner virtual user generator.

To create the virtual users and test the performance of the wether India application, follow the steps given below.

  1. Start the load runner controller.
    START> PROGRAMS> LOAD RUNNER> CONTROLLER.
  2. On starting the controller, it displays a dialog box. Select the “manual scenario” option and the required test script from the “available scripts” and click OK button.
  3. From the “load runner scenario” dialog, click the “generator” button or select the “load generators” from the scenario menu. Load generator dialog is opened.
    Click the add button to add a generator, or double click the status column of the default, which displays the load generator information.
    Host name refers to the identity of the system. Enter the name of the system in this field. Select the platform and click OK button.
  4. In the load generator dialog, click the connect button to change the status of the load generator from “Down” to “Ready” and click disconnect button to change the status of load generator from “Ready” to “Down”.
  5. Click close button to close the load generator dialog.
  6. In the load runner controller- scenario1 dialog, click the add group to create the group for the virtual users. It then displays the add dialog box. Enter the group name as g1, select the host name from the “load generator name” and select the test script from the “select script” list box that has to be tested. Enter the number of virtual users to be created in the vusers quantity and click the OK button.
  7. The group g1 will be displayed along with its host name and number of virtual users in the load generator controller scenario 1.
  8. Click the vusers button to view the virtual users. Initially all the users are in the down state. Select all the users and right click to select the initialize vusers options. All the vusers will change their state from “down”- “initializing”- “ready” mode. Now to run the vusers, again select all the vusers, right click and select run vusers or click the run button. The status of the vusers will change from ready to running done. Passed or done. Failed.
  9. Once all the vusers complete the execution of the script, it displays which user has passed the test and which has not.
    If only 5 vusers are allowed to test the wether India application simultaneously, then all the vusers successfully complete the test. This means that the server that is processing the requests is not able to take the load of all the 10 users at a time.
  10. Click the close button to close the vusers window.
  11. Analyze the test results.
    TOOLS> ANALYSIS.
    Load runner internally opens the load runner analysis. It displays load runner analysis dialog. It automatically displays the list of reports that can be analyzed. You can obtain the following reports.
    • Running Vusers.
    • Hits per second.
    • Throughput.
    • Transaction summary.
    • Average transaction response time.
  12. Analyze the results by studying graphs. The transaction summary report specifies the number of vusers that passed and failed the various section of the script i.e. action, vuser_init, vuser_end in the form of bar graph. Running vusers report, describes the elapsed time for each user in mm:ss format.






The latest info about icet, icetcounselling details and very good stuff on UML,Behavioral Modeling Diagrams and SOFTWARE TESTING,various testing methods.

Blogger Templates by OurBlogTemplates.com 2008