What is Load Testing?
Load testing is a kind of Performance Testing which determines a system's performance under real-life load conditions. This testing helps determine how the application behaves when multiple users access it simultaneously.
This testing usually identifies -
- The maximum operating capacity of an application
- Determine whether current infrastructure is sufficient to run the application
- Sustainability of application with respect to peak user load
- Number of concurrent users that an application can support, and scalability to allow more users to access it.
It is a type of non-functional testing. Load testing is commonly used for the Client/Server, Web based applications - both Intranet and Internet.
Need of Load Testing:
Some extremely popular sites have suffered serious downtimes when they get massive traffic volumes. E-commerce websites invest heavily in advertising campaigns, but not in Load Testing to ensure optimal system performance, when that marketing brings in traffic.
Consider the following examples
- Popular toy store Toysrus.com, could not handle the increased traffic generated by their advertising campaign resulting in loss of both marketing dollars, and potential toy sales.
- An Airline website was not able to handle 10000+ users during a festival offer.
- Encyclopedia Britannica declared free access to their online database as a promotional offer. They were not able to keep up with the onslaught of traffic for weeks.
- Most users click away after 8 seconds' delay in loading a page
- $ 4.4 Billion Lost annually due to poor performance
Why Load Testing?
- Load testing gives confidence in the system & its reliability and performance.
- Load Testing helps identify the bottlenecks in the system under heavy user stress scenarios before they happen in a production environment.
- Load testing gives excellent protection against poor performance and accommodates complementary strategies for performance management and monitoring of a production environment.
Goals of Load Testing:
Loading testing identifies the following problems before moving the application to market or Production:
- Response time for each transaction
- Performance of System components under various loads
- Performance of Database components under different loads
- Network delay between the client and the server
- Software design issues
- Server configuration issues like Web server, application server, database server etc.
- Hardware limitation issues like CPU maximization, memory limitations, network bottleneck, etc.
Load testing will determine whether system needs to be fine-tuned or modification of hardware and software is required to improve performance.
Environment needs to be setup before starting the load testing:
|Hardware Platform||Software Configuration|
| || |
Prerequisites of load testing:
The chief metric for load testing is response time. Before you begin load testing, you must determine -
- Whether the response time is already measured and compared - Quantitative
- Whether the response time is applicable to the business process - Relevant
- Whether the response time is justifiable - Realistic
- Whether the response time is achievable - Achievable
- Whether the response time is measurable using a tool or stopwatch - Measurable
Strategies of load Testing:
There are many numbers of ways to perform load testing. Following are a few load testing strategies-
Load Testing Process:
The load testing process can be briefly described as below -
- Create a dedicated Test Environment for load testing
- Determine the following
- Load Test Scenarios
- Determine load testing transactions for an application
- Prepare Data for each transaction
- Number of Users accessing the system need to be predicted
- Determine connection speeds. Some users may be connected via leased lines while others may use dial-up
- Determine different browsers and operating systems used by the users
- Configuration of all the servers like web, application and DB Servers
- Test Scenario execution and monitoring. Collecting various metrics
- Analyze the results. Make recommendations
- Fin-tune the System
Guidelines for load testing:
Difference between Load and Stress testing:
|Load Testing||Stress Testing|
|Load testing identifies the bottlenecks in the system under various workloads and checks how the system reacts when the load is gradually increased||Stress Testing determines the breaking point of the system to reveal the maximum point after which it breaks.|
Difference between Functional and Load Testing:
|Functional Testing||Load Testing|
|Results of functional tests are easily predictable as we have proper steps and preconditions defined||Results of load tests are unpredictable|
|Results of functional tests vary slightly||Load test results vary drastically|
|Frequency of executing Functional Testing will be high||Frequency of executing load testing will be low|
|Results of functional tests are dependent on the test data||Load testing depends on the number of users.|
Load Testing Tools:
Tools recommended for load testing are:
WebLOAD, LoadView and Loadrunner and are the most popular load testing tools. Their features are listed below –
WebLOAD is an enterprise scale load testing product that supports hundreds of technologies, enterprise applications, network protocols and operating systems. WebLOAD is known for flexibility – it supports many integrations and the scripting lets you run complex test scenarios.
With WebLOAD, you can generate load on premise or in the cloud.
WebLOAD major features include:
- Load Generation Console which generates massive virtual user load – locally and on the cloud, on Windows or Linux, via AWS or other cloud providers.
- Analytics Dashboards with over 80 configurable report templates and a web dashboard for collaborative root cause analysis.
Read more about WebLOAD here.
LoadView is a cloud based load testing platform that offers complete testing flexibility. Test webservers and Web APIs (REST, SOAP, JSON/XML) by generating a sequence of HTTP GET/POST requests. LoadView is also capable of simulating user behavior for web apps, portal logins, shopping carts and web transactions in a real browser.
With LoadView, you can test your infrastructure at any scale. From small targeted tests to millions of users, find performance bottlenecks and adjust your capacity plan accordingly.
LoadView features include:
- 100% managed cloud
- On-demand load tests
- Real browser testing
- Test on 40+ devices with multi-browser support
- Multi-location load testing
Signup for a free trial of LoadView here
Load runner is HP tool used to test the applications under normal and peak load conditions. Load runner generates load by creating virtual users that emulate network traffic. It simulates real time usage like a production environment and gives graphical results.
Advantages and disadvantages of Load testing:
Following are the advantages of Load testing:
- Performance bottlenecks identification before production
- Improves the scalability of the system
- Minimize risk related to system down time
- Reduced costs of failure
- Increase customer satisfaction
Disadvantages of Load testing:
- Need programming knowledge to use load testing tools.
- Tools can be expensive as pricing depends on the number of virtual users supported.
Load testing typically improves performance bottlenecks, scalability and stability of the application before it is available for production. This testing helps to identify the maximum operating capacity of applications as well as system bottlenecks.