Load testing
Load testing is the process of putting demand on a system and measuring its response.
Software load testing
The term load testing is used in different ways in the professional software testing community. Load testing generally refers to the practice of modeling the expected usage of a software program by simulating multiple users accessing the program concurrently. As such, this testing is most relevant for multi-user systems; often one built using a client/server model, such as web servers. However, other types of software systems can also be load tested. For example, a word processor or graphics editor can be forced to read an extremely large document; or a financial package can be forced to generate a report based on several years' worth of data. The most accurate load testing simulates actual use, as opposed to testing using theoretical or analytical modeling.Load testing lets you measure your website's quality of service performance based on actual customer behavior. Nearly all the load testing tools and frame-works follow the classical load testing paradigm: when customers visit your web site, a script recorder records the communication and then creates related interaction scripts. A load generator tries to replay the recorded scripts, which could possibly be modified with different test parameters before replay. In the replay procedure, both the hardware and software statistics will be monitored and collected by the conductor, these statistics include the CPU, memory, disk IO of the physical servers and the response time, throughput of the system under test, etc. And at last, all these statistics will be analyzed and a load testing report will be generated.
Load and performance testing analyzes software intended for a multi-user audience by subjecting the software to different numbers of virtual and live users while monitoring performance measurements under these different loads. Load and performance testing is usually conducted in a test environment identical to the production environment before the software system is permitted to go live.
As an example, a web site with shopping cart capability is required to support 100 concurrent users broken out into following activities:
- 25 virtual users log in, browse through items and then log off
- 25 VUsers log in, add items to their shopping cart, check out and then log off
- 25 VUsers log in, return items previously purchased and then log off
- 25 VUsers just log in without any subsequent activity
The specifics of a load test plan or script will generally vary across organizations. For example, in the bulleted list above, the first item could represent 25 VUsers browsing unique items, random items, or a selected set of items depending upon the test plan or script developed. However, all load test plans attempt to simulate system performance across a range of anticipated peak workflows and volumes. The criteria for passing or failing a load test are generally different across organizations as well. There are no standards specifying acceptable load testing performance metrics.
A common misconception is that load testing software provides record and playback capabilities like regression testing tools. Load testing tools analyze the entire OSI protocol stack whereas most regression testing tools focus on GUI performance. For example, a regression testing tool will record and playback a mouse click on a button on a web browser, but a load testing tool will send out hypertext the web browser sends after the user clicks the button. In a multiple-user environment, load testing tools can send out hypertext for multiple users with each user having a unique login ID, password, etc.
The popular load testing tools available also provide insight into the causes for slow performance. There are numerous possible causes for slow system performance, including, but not limited to, the following:
- Application server or software
- Database server
- Network – latency, congestion, etc.
- Client-side processing
- Load balancing between multiple servers
Load testing is performed to determine a system's behavior under both normal and anticipated peak load conditions. It helps to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation. When the load placed on the system is raised beyond normal usage patterns to test the system's response at unusually high or peak loads, it is known as stress testing. The load is usually so great that error conditions are the expected result, but there is no clear boundary when an activity ceases to be a load test and becomes a stress test.
The term "load testing" is often used synonymously with concurrency testing, software performance testing, reliability testing, and volume testing for specific scenarios. All of these are types of non-functional testing that are not part of functionality testing used to validate suitability for use of any given software.
User experience under load test
In the example above, while the device under test is under production load - 100 VUsers, run the target application. The performance of the target application here would be the User Experience Under Load. It describes how fast or slow the DUT responds, and how satisfied or how the user actually perceives performance.Browser-level vs. protocol-level users
Historically, all load testing was performed with automated API tests that simulated traffic through concurrent interactions at the protocol layer. With the advance of containers and cloud infrastructure, the option is now present to test with real browsers. Each approach has its merits for different types of applications, but generally browser-level users will be more akin to the real traffic that a website will experience and provide a more realistic load profile and response time measurement. BLUs are certainly a more expensive way of running tests and cannot work with all types of applications, specifically those that are not accessible through a web browser like a desktop client or API-based application.Load testing tools
Tool name | Company name | License | Type | Pricing | Focus | Notes |
Apache JMeter | An Apache Jakarta open source project | Apache License 2.0 | Local | Free | Java desktop application for load testing and performance measurement. | |
BlazeMeter | BlazeMeter Ltd. | Proprietary | Cloud based | Free plan available | Website, web app, mobile, database and other scenarios | Scalable load up to 200,000 concurrent simulated browser users from across eight geographical locations. Can also be used for integration and functional testing. |
Blitz | Spirent Communications | Proprietary | Cloud based | Trial available | Websites, mobile and REST APIs | It allows to simulate up to 50,000 simultaneous virtual users from different worldwide locations. |
Flood | Tricentis Corp. | Proprietary | Cloud based | Free usage tier, paid usage tiers | Browser based load testing, APIs and protocol driven applications | Scalable load up to millions of concurrent users from all geographic regions available on AWS and Azure, plus on-premise deployments. Pricing is based on Virtual User Hours consumed each month. |
Gatling | Open Source | Apache License 2.0 | Local | Free | Java web applications | Portable HTML reports. |
Loader.io | SendGrid Labs | Proprietary | Cloud based | Free plan available | Web applications and API | |
LoadRunner | Micro Focus | Proprietary | Local | Trial available | Primarily used for executing large numbers of tests concurrently. Can be used for unit and integration testing as well. | |
Load Test | Parasoft | Proprietary | Local | Demo available | Performance testing tool that verifies functionality and performance under load. Supports SOAtest tests, JUnits, lightweight socket-based components. Detects concurrency issues. | |
loadUI | SmartBear Software | EUPL | Local | Demo available | Cross-platform load testing tool, targeted mainly at web services. Integrates with soapUI. | |
Login VSI | Login VSI, Inc. | Proprietary | Local | Trial available | Virtual windows desktops workloads | |
NeoLoad | Neotys | Proprietary | Local | Free plan available | Web and mobile | Load can be generated from local agents or from the cloud. |
OpenSTA | Open System Testing Architecture | GNU General Public License 2.0 | Local | Free | Web server | Utilizes a distributed software architecture based on CORBA. OpenSTA binaries available for Windows. |
Rational Performance Tester | IBM | Proprietary | Local | Trial available | Eclipse based large scale performance testing tool primarily used for executing large volume performance tests to measure system response time for server based applications. | |
Siege | Open source | Open source GPLv3 or later | Local | Free | Web servers | Supports basic authentication, cookies, HTTP, HTTPS and FTP protocols. |
Silk Performer | Borland | Proprietary | Local | Trial available | Application performance tool with cloud and local virtual agents. Supports most protocols and applications. Licensed. | |
Test Studio | Telerik | Proprietary | Local | Trial available | Assess how website would perform if visited by a large number of users at the same time. | |
Visual Studio Enterprise edition | Microsoft | Proprietary | Local | Trial available | Visual Studio Enterprise edition includes a load test tool which enables a developer to execute a variety of tests with a combination of configurations to simulate real user load. | |
WebLOAD | RadView | Proprietary | Local | Free plan available | Web and Mobile applications and API | Load testing tool for web and mobile applications including Web Dashboard for performance test analysis. Used for large-scale loads which can be generated also from the cloud. Licensed. |
Physical load testing
Many types of machinery, engines, structures, and motors are load tested. The load may be at a designated safe working load, full load, or at an aggravated level of load. The governing contract, technical specification or test method contains the details of conducting the test. The purpose of a mechanical load test is to verify that all the component parts of a structure including materials, base-fixings are fit for task and loading it is designed for.Several types of load testing are employed
- Static testing is when a designated constant load is applied for a specified time.
- Dynamic testing is when a variable or moving load is applied.
- Cyclical testing consists of repeated loading and unloading for specified cycles, durations and conditions.