Why are you doing load testing? We often repeat that load testing is essential and a load test process doesn't appear from anywhere. A strategy backs it up. What are the load testing objectives? That's what we are to answer in this article.
When you set out on a load-testing exercise of your web application, there are several metrics you will look to measure. The gathered data will assist you in uncovering and ultimately resolving potential problems in the application’s performance, which can be costly. Not everything needs to be measured, but the following metrics are worth considering.
How long does each transaction in your user journey take to respond? Examples of a transaction could be logging into the system, adding an item to a shopping cart, or completing the checkout process. If a transaction comprises multiple API calls, these can be grouped to get an overall indication of the response time for a particular transaction or analyzed individually.
It is common for the average transaction response time to be measured and reported during load testing. While this metric has some merit, you should know its limitations. An average response time can be easily skewed by one or two data outliers, resulting in a false impression that the response time is far greater (or smaller) than the reported one.
A much better metric to use for response time is the nth percentile. Most load testing tools will report transaction response times on various percentiles, such as the 70th, 80th, and 90th percentile. This metric reads as “90% of transactions completed in this time or less” and paints a far more accurate description of the system's response time and overall performance that users will experience.
This measures the number of transactions that can be put through the system over a specified period (typically measured in transactions per second). The throughput of a system will indicate how much traffic the system can effectively process over any given period.
When an application runs at different levels of load and throughput, this metric will indicate how many errors are occurring. You can also differentiate by the types of errors that occur at different loads. Examples of error types include timeouts, bad requests, or deadlocks due to too many processes attempting to access the same resource concurrently.
During the execution of the load test, it is crucial to instrument and measure the performance of the backend systems that make up the application. Dedicated system monitoring tools carry out this instrumentation. Examples of metrics that will be measured for server resource utilization include CPU % used, memory % used, network I/O, etc.
We have now identified some of the criteria we might use to measure the performance of a system through load testing. With that in mind, there are three distinct, common objectives that you may aim to achieve through your load-testing efforts:
Suppose you are about to take out a mainstream advertisement or envisage your customer base will expand significantly in the next six to 12 months. Here, the objective of the load test is to assess whether your current system can support this anticipated increase in load while still operating at a satisfactory level of performance.
When a system has experienced a major outage, it can be necessary to recreate this situation in a controlled environment. With appropriate monitoring orchestration of the system, the data produced from load testing can be used to identify performance bottlenecks. Subsequently, the same load test can determine the effectiveness of the performance fixes introduced to remedy these issues.
A robust load-testing strategy allows you to train your system’s ability to handle different situations before these occur. A common load-testing objective is to assess the effectiveness of your deployment, monitoring, and operational procedures. Adjustments can be made as necessary, with additional load-test scenarios executed to assess their impact.
If you think of launching load tests for your website, consider what you want to achieve first. Defining your load testing objectives will be key to defining your tests, scenarios, and, ultimately, your potential optimizations to improve your business.
Using Gatling, you will find detailed reporting with the most valuable metrics for your load test. Visit our website to learn more about our solutions.