Load testing is a type of non-functional testing. A load test is type of software testing which is conducted to understand the behavior of the application under a specific expected load. Load testing is performed to determine a system’s behavior under both normal and at peak conditions.
Load testing one among the different kinds of performance testing that determines the performance of the system in real time load conditions. It is basically used to ensure that the application performs satisfactorily when many users try to access or use it at the same time.
Table Of Contents
- What is Load Testing?
- Examples of load testing include
- Types of Load Testing Tools
- Process – How To Do Load Testing?
- Why is load testing important?
- Importance of Load Testing – Examples
- Advantages of Load Testing
- Disadvantages of Load Testing
- Load testing tools
- Load testing online (load testing from the cloud)
- Difference Between: Load Testing vs Stress Testing
What is Load Testing?
- Load testing is used to identify whether the infrastructure used for hosting the application is sufficient or not
- It is used to find if the performance of the application is sustainable when it is at the peak of its user load
- It tells us how many simultaneous users can the application handle and the scale of the application required in terms of hardware, network capacity etc., so that more users could access the application
- It helps to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation. E.g. If the number of users are increased then how much CPU, memory will be consumed, what is the network and bandwidth response time.
- Load testing can be done under controlled lab conditions to compare the capabilities of different systems or to accurately measure the capabilities of a single system.
- Load testing involves simulating real-life user load for the target application. It helps you determine how your application behaves when multiple users hits it simultaneously.
- Load testing differs from stress testing, which evaluates the extent to which a system keeps working when subjected to extreme work loads or when some of its hardware or software has been compromised.
- The primary goal of load testing is to define the maximum amount of work a system can handle without significant performance degradation.
- Load testing falls under the category – non-functional testing. Its mainly used for testing the performance of Client/Server and applications which are web based.
- In many organizations load testing is performed at the end of the software development life cycle while some organization do not perform load testing at all. In case there are performance issues in the application, this could result in loss of revenue to the customer.
Examples of load testing include
- Downloading a series of large files from the internet
- Running multiple applications on a computer or server simultaneously
- Assigning many jobs to a printer in a queue
- Subjecting a server to a large amount of traffic
- Writing and reading data to and from a hard disk continuously
Types of Load Testing Tools
Load testing could be done manually as well as by using an automation testing tools:
1. Load testing performed manually
This type of load testing is done manually hence it cannot provide enough stress on the application. Also, it could be very expensive to do load testing manually as it requires lot of manpower.
2. Load testing tools developed within the company
An organization could build its own proprietary tools to perform load testing on its applications.
3. Load testing tools (Open source)
These tools are available free for charge but they are not as classy as licensed load testing tools mentioned below. Most commonly used open source load testing tool is Jmeter.
4. Licensed load testing tools (Enterprise)
Licensed load testing tools support many protocols so that load testing could be performed on many different types of applications such as ERP/CRM, Streaming Media etc. Also they are able to mimic a lot of virtual users. Most commonly used licensed load testing tool is Loadrunner.
Process – How To Do Load Testing?
The process of load testing involves the following steps:
1. Test environment setup
In this step the test environment for the load test is setup. The test environment should be setup as close to the production environment as possible in terms of hardware, network, software specifications etc
2. Define performance criteria
Performance metrics for the load test are defined in this step and success criteria are finalized. This can include defining acceptable limits on throughput, response time, transactions etc
3. Planning the test
It involves development of a clearly defined load test plan and setting up the test environment.
4. Creation of virtual users (vuser)
Involves creation of Vuser scripts which contain various tasks performed by every vuser. Tasks performed by vusers could be measured as transactions.
5. Creation of scenarios
A scenario is a combination of machines (agents), scripts, and vusers that run during a testing session. In Loadrunner, scenarios are created using Loadrunner controller. Scenarios could be of two types: manual and goal oriented.
6. Running the scenario
The load on the server is emulated by running multiple vusers to perform the tasks simultaneously. Before running the scenario, scenario configuration and scheduling need to be set up. We can run the entire scenario, vuser groups or individual vusers.
7. Monitoring the scenario
Scenario could be monitored using the Loadrunner online monitors such as run-time transaction, system resource, web resource, network delay etc.
8. Analyzing test results
This is the most important step in load testing process. In this step tester analyzes the performance bottlenecks using graphs and reports generated during scenario execution. Load test may have to be repeated after fixing issues identified in the load test.
Why is load testing important?
Load testing is important because of the following reasons:
1. Load testing simulates real user scenarios
While testing the website or an app under a load, tester is actually simulating how it will perform when hundreds, thousands or even millions of users visit it in real time.
The application might perform well for one user during functional testing but its performance might degrade when many users try to access it simultaneously during load testing due to lack of system resources.
Therefore it is better to load test to understand, analyze and fix bugs before they actually happen in real time.
2. Code change could affect the performance of the application
Even if you performed load testing as part of the testing process few months ago but if the code got changed several times after that then it is better to perform load testing again. All the changes that have been made to the code after your load testing might have affected the system’s ability to handle load.
To make sure that the end user is not surprised by the system’s performance, it is good to run an automated load test as part of continuous integration cycle.
3. Load testing saves money and indirectly generates revenue
Hiring testers to do load tests could incur additional cost but the cost of fixing a website that crashes in real time is even more expensive.
Importance of Load Testing – Examples
- Target.com lost $780,000 in sales in just 3 hours when the site was down during a promotion in 2015
- When Amazon.com servers crashed in 2013 for 30 minutes, Amazon lost $66,240 per minute
- In Sept 2010, Virgin Blue airlines experienced a series of outages and crashes for 11 days which resulted in its checkin, online booking, reservations and boarding systems being down. This lead to a loss of $20 million in addition to thousands of frustrated customers. The company Navitaire, which managed reservation for Virgin Blue had to compensate Virgin Blue for $20milion.
- According to a survey, 75% users said that if a site crashed or if it was slow, they would leave the site
- 50% of the users said that they will shop elsewhere if the website or app did not load in 3 seconds
- As you can see, more people tend to purchase products during a promotional event like Black Friday, Cyber Monday, Diwali or when there is a promotional offer / discount etc
- More people tend to book flight tickets during holidays or on the days when an airline has an offer
- If your site crashes during such an event visitors may leave your website and go to a competitors website. This can lead to loss of revenue and market share.
- Such situations can be prevented by load testing the system and fixing any issues that are detected
Advantages of Load Testing
- Issues related to performance and bottlenecks could be identified before production
- The system’s scalability is improved in terms of database, software, network etc
- There is minimization of the risk associated with down time of the application / system
- Cost of failure is reduced and satisfaction of the customer is increased
Disadvantages of Load Testing
- Testers need knowledge of tools and in some complex cases, the programming languages to perform load testing
- There is significant cost associated with load testing as tools may be expensive, additional resources with special knowledge of the testing tools may be required
Load testing tools
The following includes open source as well as licensed load testing tools, but almost all the licensed tools have a free trial version so that the users get the chance to work hands-on before deciding which is the best tool for their needs:
1. Webload
Organization wide load and performance testing tool for web applications.
2. LoadUI NG Pro
LoadUI’s easy-to-use graphical interface makes it simple for new users to setup load scenarios.
3. SmartMeter.io
It provides advanced testing features with Jmeter at its core.
4. Triscentis Flood
It is a cloud-based, distributed load testing tool.
5. Loadview
It is a fully managed, on-demand load testing tool that allows for completely hassle-free load and stress testing.
6. Apache Jmeter
It is an open source load testing tool and it is a Java platform application.
7. HP Loadrunner
This is an HP product which can be used as a load testing tool. It can handle and create thousands of virtual users at the same time.
Load testing online (load testing from the cloud)
Cloud is a pay per use kind of a model. Moving load testing to the cloud brings benefits such as lower costs and support of distributed team.
It also allows to simulate millions of concurrent users from multiple geographic locations.
7 essential cloud-based load testing tools:
1. Load Impact
It is a SaaS based performance testing solution for modern DevOps teams.
2. Flood IO
It is a cloud based, distributed load testing solution that ensures applications run reliably before, during and after DevOps releases.
3. Loader
It is a free load testing service that allows you to stress test your web-apps and API’s with thousands of concurrent connections.
4. Load storm
It is an easy and cost effective load testing tool for web and mobile applications.
5. Blazemeter
It is 100% compatible with Apache Jmeter and other open-source tools like Jenkins and Selenium Webdriver.
6. Load Focus
It is an easy and cost effective way to test websites, mobile/web applications, web services and API’s.
7. Octoperf
It is a SaaS based performance testing tool powered by Jmeter for the web, API, REST and mobile app.
Difference Between: Load Testing vs Stress Testing
Load Testing | Stress Testing |
A load test is a planned test to perform a specified number of requests to a system in order to test the performance of the system. | A stress test is a test designed to increase the number of simultaneous requests on a system past a point where performance degrades, possibly even to a point of complete failure of the system |
The goal of a load test is to prove that a system can handle the expected number of concurrent users with minimal to acceptable performance degradation | The goal of stress testing is to find the breaking point of the system and see where it crashes |
In load testing, number of simultaneous users on a system are increased to a reasonable extent | In stress testing, intention is to continue increasing load on the system until the resources are overloaded |
A load test and stress test are certainly not completely independent from one another | Often times, when running the upper boundaries of a load test, you may end up running a stress test where you push the system past the limits of available resources |
Other popular articles:
- What is Stress testing in software testing? Example,How To Do,Interview Questions,Types
- What is Performance testing, Load testing and stress-testing tools in software testing?
- Difference between Volume, Load and stress testing in software
- Monkey testing- Examples, Differences, Tools,How To Do, Advantages, Disadvantages, Types
- What is Non-functional testing (Testing of software product characteristics)?
amar kathe says
Thank you so much for sharing detail information on load testing. I would really appreciate this article.
William Hruska says
Thank you so much for sharing detail information on load testing. I would really appreciate this article.
Oluwaseun Oshagbemi says
Very concise and useful resources.
alok kumar padhi says
This is the good website for increase the testing knowledge,to making a good position in any environment.