Here's a new way to learn load runner easily. Basically I worked on 9.0 version. So, Here are the basic concepts of the load runner which are helpful for beginners.
Basically Load Runner is automation performance tool which comes under performance testing.
Let's see what is performance testing and what we do in performance testing.
Performance Testing:
Performance testing will be done to ensure that there are no performance related risks at the time of production or live environment. It's a means of Quality Assurance.
The main focus of Performance testing is checking a software program's to check or validate the application/products'
Speed: Determines whether the application responds quickly.
Scalability: Determines maximum user load the software application can
handle.
Stability: Determines
if the application is stable under varying loads.
Load Testing: checks the application’s ability to perform under anticipated user loads. The objective is to identify performance bottlenecks before the software application goes live.
Stress Testing: involves testing an application under extreme workloads to see how it handles high traffic or data processing .The objective is to identify breaking point of an application.
Endurance Testing: is done to make sure the software can handle the expected load over a long period of time.
Spike Testing: tests the software’s reaction to sudden large spikes in the load generated by users. The best example for spike testing is train reservation during tatkal time.
Scalability Testing: The objective of scalability testing is to determine the software application’s effectiveness in “scaling up” to support an increase in user load. It helps plan capacity addition to your software system.
Volume Testing: Under Volume Testing large no. of. Data is populated in database and the overall software system’s behavior is monitored. The objective is to check software application’s performance under varying database volumes
Common Performance Problems:
- Long Load Time.
- Poor response time.
- Bottle necking.
- Scalability.
- Load runner
- J Meter
- Open STA
- Neo Load
- Open Load
- Load Impact
LOAD RUNNER
Why Load
Runner??:
- Load Runner: One of the best automated performance testing tool.
- Uses ANSI C as the default programming language and other languages like Java and VB.
- No need to install it on the server under test. It uses native monitors.
- Supports all types of protocols (HTTP, FTP and SMTP).
- Easy to analyze the results and creating scripts.
Let's discuss much about the tool now.There are main components of Load Runner. They' are:
Components of Load
Runner:
1) Vuser Generator
2) Controller
3) AnalyzerLet's discuss about each component briefly with related examples.
VUser Generator:
The first component and the basic component is "Vuser Generator". In Load Runner tool, humans are replaced by Vusers who are the replica
of humans. More number of Vusers can be worked on a single work station with
different scenarios. Load runner can accommodate hundreds or even thousands of
Vusers with different scenarios.
With the help of Vuser script, users can perform the tests. User can record and playback the application for script generation.By modification or editing the scripts, user can create different scenarios for different Vusers. With this load test can be made simple and easy with one workstation.
Load runner supports scripting languages like ANSI C, VB Script, JAVA etc.. C and VB scripting are the most used ones in load runner. In recent versions of load runner JAVA scripting has been implemented, which can be widely used.
Controller:
In Load Runner ‘Controller’ is used to control the VUsers
with single work station with different scenarios assigned to VUsers.
Analysis:
After the performance test the user can view the results of
the test in graphs.More into the concepts of Load Runner. As we discussed, we start with 'Vuser Generator'.
Vuser scripts are created by Virtual User Generator with the recording of activities between client and server. It records the scripts. These scripts are used to emulate the steps of real human users. Using Vugen, we can also run the scripts for debugging.
VuGen can be used for recording in windows platforms. But, a recorded Vuser script can also be run on Unix platform.Vuser scripts are created by Virtual User Generator with the recording of activities between client and server. It records the scripts. These scripts are used to emulate the steps of real human users. Using Vugen, we can also run the scripts for debugging.
Developing Vuser Script is a five step process:
- Record a Vuser script
- Vuser Script Enhancement – by adding the control statements and other functions
- Run time Settings Configuration
- Running of Vuser Script on Stand Alone machine – Verify that the script runs correctly
- Integration of Vuser Script – into a LoadRunner scenario or Performance Center or Tuning module session or Business process monitor profile etc.
Steps to create scripts:
Vuser generator (VuGen) will be able to record the scripts from the application. User can record the
application script.
- Launch Load Runner-> Select record or create script.
- Select New Vuser Script-> Select Next.
- Select the needed protocol (Supports multiple and single protocols) -> Click OK.
- Select ‘Tools’ from menu bar ->Recording Options-> Under Recording options Select ‘Recording’
- Select the particular protocol type and script types (with or without user actions i.e. only URL’s)
- Select ‘start Recording’ under menu pane.
- Enter the website on the dialog box-> Select ‘OK’.
- Perform the actions on the website opened.
- Automatic script creation will be done in load runner.
- End of Script creation.
Note: Steps might differ w.r.t the tool version.
With the user script created, we can parametrize the recorded script. Parameterisation helps us to create different actions for different Vusers which will be allocated in run-time settings.
Really confused about parameterisation? Don't worry I'll make it simple with the general example. In general, when we record the scenario with values A,B,C...the script contains the same values and when we want to change to 1,2,3...again we need to record the script. Instead of recording the script again and again for different values, we will parameterize the values with the required ones.
Parameterisation:
User can parameterize the created script with respective parameters in the application. Major advantage of load runner is that the user can insert any number of parameters in to the script with respect to application.Watch this tutorial for more info on parameterisation..Watch the video for more info regarding parameterisation, might be in depth in concept wise, can be understood easily: https://www.youtube.com/watch?v=Ebcw9x15Vrs
Process to parameterize:
- Right click on the appropriate parameters in the script.
- Select replace parameters.
- The parameter name must be generic(the parameter naming is user-defined and named as per ease of use) as per the application defined.
- Insert with respective parameters in the parameters window.
- Select ‘OK’.
Note: Steps might differ w.r.t the tool version.
enu->View->run
time settings-> change the settings as per the requirements.
There are few ways to adopt a parameter and as per the availability we can assign the type of the parameter to it.
Types of Parameters:
- File
- Table
- XML
- Random Number
- Iteration Number
- Unique Number
- Load generator Name
- Date/Time
- Vuser ID
- User-Defined parameter.
File and Table:
This is the most widely used parameter types in the
performance testing domain. Vusers take value from the data file and table.When a file type or table type parameter is used, a .dat file is created. By default all
the data files are named as <Parameter Name>.dat and are stored in the
script’s directory.When VuGen opens the data file, it displays the first 100
rows. To view all of the data, click ‘Edit with Notepad’ and view the data in
‘parameter properties’.
XML type parameters:
XML type parameters:
The XML
Parameter Types are used for multiple valued data contained in an XML
structure. It replaces a complex structure in which an array can be made a part
of another array.
Random
Number:
Random Number replaces the parameter with a
random number. While creating random type parameter, a minimum and maximum
value of the range (the range, out of which the random number is planned to be
selected) is required to be set.
For example, you need to see the 50 transactions which are happened in your application. By giving respective incident IDs(range: Min-Max) you can get the transaction and can run the situation.
Iteration
Number:
As the name says Iterate, the current iteration number will be replaced with the Vuser parameter.
Unique Number:
Unique, with this parameter we can insert a single and unique parameter by specifying its Range.
For example if you want to get the data for employee number from 99-101, just insert the number and run it. We can get the required data.
For example if you want to get the data for employee number from 99-101, just insert the number and run it. We can get the required data.
Load Generator Name:
It's one of the best parameter while we are running Vusers in larger numbers. While execution it just replaces the current parameter with the name of the Vuser script’s load generator. It will make things simple to find the failure while analyzing.
Date/Time parameter type:
A Date/time parameter replaces the
parameter with a date and/or time. One can specify one’s own format of
date/time representation.
Applications which use Date/Time as the main asset, this parameter is very useful.
There are many more parameter types which can be observed while practicing the tool.
Will update the more info regarding load runner soon.. :-)
Applications which use Date/Time as the main asset, this parameter is very useful.
There are many more parameter types which can be observed while practicing the tool.
Will update the more info regarding load runner soon.. :-)