Performance Testing with Load Testing and Stress Testing

Tram Ho

Refer: https://www.blazemeter.com/blog/performance-testing-vs-load-testing-vs-stress-testing

If you’re a dev, QA, or DevOps, you know you need to do different types of performance checks to make sure every code change or new feature added will work and not break the system. But what kind of performance testing should you conduct, what is the difference between load test and other types of testing, and which test is suitable for which situation? In this blog post we will cover the answers to these questions.

What is Performance Testing?

Performance Testing is the generic name for testing how a system works and performs. Performance Testing tests software responsiveness, stability, scalability, reliability, speed, and resource usage. Different types of Performance Testing give you different data, as we’ll cover it in more detail.

Before performing Performance Testing, it is important to define your system’s bussiness goal, so that you can know if your system is performing well according to customer needs.

After running the Performance Testing, you can analyze different KPIs, such as number of virtual users, number of hits per second, number of errors per second, response time, latency. and the number of bytes per second (throughputs), as well as the correlation between them. Through reports, you can identify bottlenecks, bugs and errors and decide what needs to be done.

When should you use the Performance Test?

When you want to test website performance and application performance, as well as server, database, network … If you work with Waterfall model, use at least one release every time. . If you follow the Agile model, you should continually test.

Here is an example of the Performance Test report on CA BlazeMeter. This is a good test, since the increasing number of users has no effect on response times, the error rate continues to be low and the number of hits per second increases with the number of users but remains stable.

What is load test?

Load test is a test that tests how the system works under a large number of virtual users simultaneously performing transactions in a certain period of time. In other words, how the system handles heavy loads. There are several types of open source load test tools, and JMeter is the most popular.

When should you use the load test?

When you want to determine the number of users your system can handle. You can define different user scenarios that allow you to focus on different parts of the system, like the checkout page on your website or your app to test the web load. You can also define how the load works, such as where the user’s geography comes from or how the load build and maintain within the system. Basically, load testing is something you should do all the time to make sure your system is working properly. That’s why it should be integrated into your ongoing Integration cycles, with tools like Jenkins and Taurus.

Here is how to test the load in JMeter. This test analyzes 100 more users every 30 seconds until it reaches 1,000 users. The whole process takes 300 seconds. After reaching 1,000 threads, all of them will continue to run and attack the server together for 5 minutes.

What is Stress Test?

Stress Test is to test the upper limits of your system by testing it under extreme loads. The test checks how the system works under intense load and how it recovers when it returns to normal use, i.e. are KPIs like throughputs and response times the same as before? In addition to the load test KPI, Stress Test also checks for memory leaks, slowdowns, security issues, and data corruption.

Stress Test can be performed through load testing tools, by defining a test case with a very high number of concurrent virtual users. If your Stress Test scenario includes a sudden increase in the number of virtual users, it’s called a Spike Test. If you Stress Test for a long time to test the stability of the system over time with slow growth, then it is called Soak Test.

When to use Stress Test?

Website stress tests and app stress tests are critical before big events like: Black Friday, ticketing to a popular high-demand concert or elections. But we recommend the Stress Test from time to time so you know the tolerance of your system. This ensures you are always prepared for sudden spikes in traffic, and gives you more time and resources to fix your bottlenecks.

In this example, we describe how to achieve a spike in traffic using the “Ultimate Thread Group” component. We assume that the system under test is inactive at 3:00 minutes after the test has started. With the Ultimate thread group, we define additional threads that run in fixed time windows using the initial delay property (see figure below).

Using different types of performance testing ensures you are always aware of the problems you face and that you can make a plan to address them. So, don’t give up any kind of check.

Share the news now

Source : Viblo