Load Testing, Stress Testing, and Performance Testing: All You Need to Know

Stan Georgian
ITNEXT
Published in
5 min readJun 26, 2020

--

Photo by Mitchell Luo

Have you ever been in a position where the expression It’s never done that before or It worked yesterday made absolute sense when it came to testing?

If you answered yes, then you’re in good company. We have all gone through this stage, and we still go through it from time to time.

Even though today we have complex and vastly powerful tools that in 99% of cases should make these problems redundant, there are still those 1% situations in which something unexpected appears, such as a corner case that was not taken into consideration.

In terms of web development, one of the most unpleasant situations is when a large number of users use the application simultaneously. Because of this, the application can actually crack due to too much load. This is a problem that can affect most users simultaneously.

Testing is the solution to mitigating most of these problems, and for this particular situation, Performance Testing is the way to go.

Performance Testing Explained

This field is one in continuous change and development. Because of this, things happen much too quickly for them to be clearly defined and delineated. Therefore, situations where the terms are misused appear quite often.

The labels performance, load, and stress testing make a perfect example of this situation.

In simple terms, load testing and stress testing are both a subset of performance testing, which is used for determining the performance of a system’s components in different load scenarios.

Overall this technique is used to determine how well a web application performs in various real use cases.

This indicator is vital because, 99.9% of the time, the page load time affects conversion rates, sales, and user experience.

On mobile devices, for example, the best practice is to display the website content in under 3 seconds.

The harder it is to load, the higher the bounce rate.

As a quick tip with Developer Tools, you can test the performance of any website you access using various indicators. All you have to do is navigate to the desired website and open Dev Tools using CTRL+SHIFT+I or right-click, and then the tool is available in the Audits tab.

Load Testing vs. Stress Testing: What’s the Difference

If the whole pie is called Performance Testing, then two of its slices are the following:

  • Load Testing
  • Stress Testing

The difference between these two types of tests is quite subtle, but in the simplest terms, it goes like this:

  • Load testing shows how the application performs under extreme load.
  • Stress testing, on the other hand, checks how robust the application is under extreme load.

or

  • Load testing is carried out to figure out the upper limit of an app and see how the system performs under a heavy load.
  • Stress testing is carried out to see what happens when the load limit is above the threshold and how it recovers from failure.

How to Perform Load Testing and Stress Testing

When it comes to testing the performance of a web application in general, here are some of the most important indicators to consider.

Most of a test consists of collecting data about some key indicators. Some indicators worth mentioning include the response time as percentiles (50% and 95%), error rate, average load time, concurrency, and throughput measured in requests per second.

Throughput and concurrency are two terms that are a little harder to understand at first. Check out how concurrency is related to rps and how to plan for high concurrency to better understand them.

Percentiles deserve a few separate lines. This indicator is related to response time, and it comes as an improvement for averages because they can be misleading. The most popular percentiles are 50% and 95%.

For example, the following values translate to:

  • 95% Response Time = 350 ms — means that the response time for 95% of the incoming requests is within 350 milliseconds
  • 50% Response Time = 280 ms — means that the response time for 50% of the incoming requests is within 280 milliseconds

Now, given these indicators — Load Testing means to acquire data about these touchstones and to analyze them in order to find out what is the upper limit of our application and how it behaves in terms of performance under these high load conditions.

For Stress Testing, we exceed the limit we found in the previous model, and we test and hope that for a considerable duration, the servers don’t crash.

To collect this type of data about our application, we need the help of high-performance tools that return real and correct data about the application’s behavior.

One of these tools is Loadmill, which allows you to simulate real usage patterns with the use of real web traffic in order to generate load on the tested server.

The following picture reveals some of the indicators that this tool provides.

You can also check how your website performed in different geographic locations. Then, at the next upgrade, you will know which areas to place your servers in so that the response time for all traffic will be more uniform.

Conclusion

When it comes to performance testing, it is especially important to test under conditions that best describe a real-life scenario.

Sometimes the expectations you’ve set for your application aren’t realistic enough. That is why it is important to choose a tool that can simulate real usage patterns to allow you to test real-life scenarios.

--

--