#1) Performance Testing

 What is Performance Testing?

Performance testing is the testing that is performed to ascertain how the components of a system are performing under a certain given situation.

Resource usage, scalability, and reliability of the product are also validated under this testing. This testing is the subset of performance engineering, which is focused on addressing performance issues in the design and architecture of a software product.

Performance Testing

The above image clearly explains to us that Performance Testing is the superset for both load & stress testing. Other types of testing included in performance testing are Spike testing, Volume testing, Endurance testing, and Scalability testing. Thus, Performance testing is basically a very wide term.

Performance Testing Goal:

The primary goal of performance testing includes establishing the benchmark behavior of the system. There are a number of industry-defined benchmarks that should be met during performance testing.

Performance testing does not aim to find defects in the application. It also does not pass or fail the test. Rather, it addresses the critical task of setting the benchmark and standard for an application. Performance testing should be done very accurately. Close monitoring of the application/system performance is the primary characteristic of performance testing.

The benchmark and standard of the application should be set in terms of attributes like speed, response time, throughput, resource usage, and stability. All these attributes are tested in a performance test.

For Example,

For instance, you can test the application network performance through the ‘Connection Speed vs. Latency’ chart. Latency is the time difference between the data to reach from the source to the destination.

A 70kb page would not take more than 15 seconds to load for the worst connection of 28.8kbps modem (latency=1000 milliseconds), while the page of the same size would appear within 5 seconds for the average connection of 256kbps DSL (latency=100 milliseconds).

A 1.5mbps T1 connection (latency=50 milliseconds) would have the performance benchmark set as 1 second to achieve this target.

Another example would be that of a Request-response model. We can set a benchmark that the time difference between the generation of request and acknowledgment of response should be in the range of x ms (milliseconds) and y ms, where x and y are the standard digits.

Performance Load and stress testing

A successful performance test should project most of the performance issues, which could be related to database, network, software, hardware, etc.

#2) Load Testing

Load testing is meant to test the system by constantly and steadily increasing the load on the system until it reaches the threshold limit. It is a subset of performance testing.

load testing

Load testing can be easily done by employing any of the suitable automation tools available in the market. WAPT and LoadRunner are two such famous tools that aid in load testing. Load testing is also famous by names like Volume testing and Endurance testing.

However, Volume testing mainly focuses on databases. Endurance testing tests the system by keeping it under a significant load for a sustained time period.

The sole purpose of load testing is to assign the system the largest job it can possibly handle to test the endurance of the system and monitor the results. An interesting fact here is that sometimes the system is fed with an empty task to determine the behavior of the system in the zero-load situation.

The attributes which are monitored in a load test include peak performance, server throughput, response time under various load levels (below the threshold of break), adequacy of H/W environment, how many user applications it can handle without affecting the performance.

Load Testing Goal:

The goals of load testing include:

  • Exposing the defects in an application related to buffer overflow, memory leaks and mismanagement of memory. The issues that would eventually come out as a result of load testing may include load balancing problems, bandwidth issues, the capacity of the existing system, etc.
  • To determine the upper limit of all the components of an application like a database, hardware, network, etc. so that the application can manage the anticipated load in the future.
  • To set the SLAs for the application.

For Example,

Let’s consider to check the email functionality of an application, that could be flooded with 1000 users at a time. Now, 1000 users can fire the email transactions (read, send, delete, forward, reply) in many different ways.

If we take one transaction per user per hour, then it would be 1000 transactions per hour. By simulating 10 transactions/users, we could load test the email server by occupying it with 10000 transactions/hour.

Another Example of a load test is shown in the image below:

example of a load test2

The above image depicts a load test done in the tool called JMeter. This test is done to identify how many users a system can handle. In this test, 100 users are added after every 30 seconds until the load reaches 1000 users. Each step takes 30 seconds to complete and JMeter waits for 30 seconds before kicking off the next step.

Once the load reaches 1000 threads, all of them will continue running for 300 seconds (5 mins) together and then finally stops 10 thread every 3 seconds.

#3) Stress Testing

Under stress testing, various activities to overload the existing resources with excess jobs are carried out in an attempt to break the system down. Negative testing, which includes removal of the components from the system is also done as a part of stress testing.

Also known as fatigue testing, this testing should capture the stability of an application by testing it beyond its bandwidth capacity.

Thus, basically, stress testing evaluates the behavior of an application beyond peak load and normal conditions.

Stress testing

The purpose of stress testing is to ascertain the failure of the system and to monitor how the system recovers back gracefully. The challenge here is to set up a controlled environment before launching the test so that you can precisely capture the behavior of the system repeatedly under the most unpredictable scenarios.

The issues that would eventually come out as a result of stress testing may include synchronization issues, memory leaks, race conditions, etc. If the stress test is checking how the system behaves in the situation of a sudden ramp-up in the number of users, then it is called a spike test.

If the stress test is to check the system’s sustainability over a period of time through slow ramp-up in the number of users, it is called as a soak test.

Stress Testing Goal:

The goal of stress testing is to analyze post-crash reports to define the behavior of the application after failure.

The biggest challenge is to ensure that the system does not compromise the security of sensitive data after the failure. In a successful stress testing, the system will come back to normality along with all its components even after the most terrible breakdown.

For Example,

As an example, a word processor like Writer1.1.0 by OpenOffice.org is utilized in the development of letters, presentations, spreadsheets, etc.  The purpose of our stress testing is to load it with excess characters.

To do this, we will repeatedly paste a line of data, until it reaches its threshold limit of handling a large volume of text. As soon as the character size reaches 65,535 characters, it would simply refuse to accept more data.

The result of stress testing on Writer 1.1.0 produces the result that it does not crash under the stress and it handles the situation gracefully which makes sure that the application is working correctly even under rigorous stress conditions.

Write A Comment