What is Load Testing

4 min read
Feb 24, 2020 4:28:00 PM

It’s not new; web traffic is increasing by the minute. Streaming, e-commerce, banking… nowadays, every simple activity requires web access. The phenomenon peaked with COVID-19, which saw the rise of homeworking and lockdowns, thus accentuating further the already significant increase.
As it is, every popular website faces the risk of overcapacity. And Load Testing is just what you need to avoid that! What is it? How can it help? Gatling tells you everything.

 

Load testing – A definition

As a core definition, load testing sends simulated traffic (typically HTTP) to a web server and measures its capability to process the traffic and how. You load traffic on your server until something happens or not.

 

You can measure this capability, or performance, in a variety of ways:

  • Check if the server responds on time, thus providing a satisfactory end-user experience.
  • Assess the server’s resource utilization through metrics such as CPU, memory, etc.
  • Look for potential performance bottlenecks, such as a page that is particularly slow to load or an API that is slow to respond.
  • Count the number and types of errors that occur in the system when under varying load levels.
  • Test how many users the system can comfortably support simultaneously.

 

How do you load test?

You perform a load test by executing specialist load-testing software on one or more computers. This software generates and transmits many requests to a web server, using injectors, where the target application runs.

The load testing software then measures the time the server takes to respond to the requests and counts the number of errors. Separate monitoring software works in conjunction with instrumenting the webserver and assessing resource use.

Load testing environment

 

Some distinct types of load tests that can be run are:

  • Capacity test
    Increase the load gradually on the system until you find the point where system degradation begins to occur.
    Capacity test

  • Soak test
    Run a constant throughput to the system for an extended period (e.g., 24 hours) to identify issues such as memory leaks.Soak test

 

  • Stress test
    Assess how your application behaves when it receives a big spike in traffic, and determine how the system behaves and 
    recovers after it subsides.Stress test

 

Some load test vocabulary

Whatever type of load test or tests you eventually decide to execute, there are a few common terms and concepts that it is good to be aware of:

 

System Throughput
The measure of how many transactions or requests, the application can process over a specific period of time. Throughput is typically reported as requests per second.  It gives a clear indication of the rate of traffic that the system will be able to handle.

 

Response Time
How fast will the server respond when it is sent a request from the client? The response time is measured on the client side that sent the request and is the time between the request being sent and the complete response received from the server. This value is typically measured in milliseconds(ms) and is sometimes called latency.

 

Percentiles
Response times that are collected from performance testing are often grouped into percentiles. You will notice that percentiles are typically recorded at various ranges, such as the 50th, 70th, and 90th percentile. For example, if your 70th percentile response time is 200ms, 70% of transactions took 200ms or less to complete. Knowing how to read percentiles charts will give you a more accurate feel for what your end users will experience in performance, as compared to average response time, which can vary significantly to the end user.

 

There is much more to know about load testing and its related topics, such as injectors, CI/CD processes, or chaos experiments.

 

How can load testing help?

You know the basics of load testing and how to interpret load tests now. Outside of just checking if your solution can handle heavy traffic, a load test can give you answers about many subtopics:

  • Will your application run efficiently and as expected once you release it into production? Because, yes, a load test can be launched during the development process.
  • Is the performance of the application satisfactory to provide a great user experience?
  • Do we need to adjust our system's backend hardware in order to support the application sufficiently? Can the designated hardware handle the expected load? In the end, web traffic has much to do with hardware, and you must check how your servers are doing in case of heavy load.
  • Are there particular pages or areas of the application that can be tweaked, improved, or modified? You can decipher your load test section by section, page by page, and uncover specific errors or optimization possibilities.

 

Remember, a bad-performing website can impact your business in many ways. Brand image, turnover,… your website is your storefront and thus needs to be as perfect as possible.

 

Choose your load testing solution

Without conducting proper and effective load testing, answering any of the above questions is difficult. Taking the risk of deploying an application into production that has not been sufficiently tested for performance introduces an undesirable level of risk. Mitigating that risk beforehand with robust and thorough load testing is better.

As it is, the choice of your solution will be motivated by its functionalities and compatibility with your solution.

Gatling works with multiple continuous integration solutions such as Jenkins, Bamboo, or TeamCity. Flexible and with a precise reporting capacity, it can be used open-source or with our business solution.

It's time to get started on load testing!