What is Performance Testing?

Performance testing is a broader term used in the testing industry. This has equal significance in software as hardware.

Performance testing is a software testing where the performance of the software is tested as per its efficiency, usability, scalability, etc.

The scope of performance testing is not limited to the parameters mentioned here, instead, there are different parameters which we shall see while going deeper into this article, which also determines the efficiency of the software.

performance-testing-demo

Now before starting to explore more on this, it has to be kept in the mind that all the softwares are built on/run on hardwares. And hardware is a limited resource, which cannot be extended every day. Therefore, the performance of the software plays a crucial role in maximizing the output for limited resources.

When we say hardware resources, we generally talk about, CPU, RAM, Disk Space, Virtual Memory or Physical Memory, Network, Cache, etc.

Now we shall see below that why performance testing is necessary?
  • Performance testing is the way of analyzing the software before it is deployed in the real field.
  • Performance testing can save the reputation of the software company by, assuring that, the performance is already checked.
  • Performance testing helps us to make the software more efficient, as regression can be iterated if necessary, at any stage of software development.
  • Performance testing also helps us to identify the defects.
  • Performance testing is the key to minimize the use of hardware and maximize the output.
  • Performance testing is very helpful in areas where the performance cannot be compromised. For example, in medical research or operation.
  • Performance testing can save the company using the software from great loss.
  • Performance testing can measure the exact delay or deficiency of the software before it faces the real environment.

There are several factors for which performance testing is necessary and the list will go long.

Load Testing

Types of Performance Testing

Why Performance testing is divided into types?

Performance testing is divided into different types, because as mentioned earlier in this section, that, there are different parameters which determines the performance of the software, and is not confined to a single parameter.

Although there are different parameters which decide about the performance of the software, we shall discuss only a few of them which are important in the practical field.

Different types of Performance Testing:

Load Testing :

Load testing can be seen as the key to performance testing. As it is the load on the software which shows the real problems the software would be facing while in work.

load-testing-demo

Load testing means creating virtual users for the software and making the request more than the threshold and analyze the behavior of the software. This testing mainly deals with the number of requests, the number of interrupts, number of halts, the software can handle at a given time.

Stress Testing

Stress testing is the second key to performance testing. In stress testing, the software is made to put under stress. That is putting load which is more than the software is able to handle.

stress-testing-demo

Stress testing is always done to break the threshold of a load of software. The sole objective of stress testing is to analyze the behavior of the software when the software is under stress, that is a load more than, it can handle.

The significance of stress testing lies in the fact that, in the practical field, there can be a situation when a scenario would be created which is accidentally much more complicated, and it is not possible to replace the software with greater efficiency.

In this kind of cases, the software should be able to handle the scenario even when it has reached its threshold of load balancing. That is why stress testing is important.

Endurance Testing

Endurance Testing, which can be also seen as durability testing, is testing, where it is seen that for how long the software is able to handle the load which is beyond its threshold. The sole objective of endurance testing is to see how much time the software is working normally during stress.

endurance-demo

Endurance Testing is the key to check the stability of the software with the system.

Let us take an example of a shop which, where the software is used to calculate all the prices of good that was sold during the day. Let the sales sheet will be created at the end of the month.

Now take a scenario, that the software can handle 1000 inputs in a day and calculate the GST on them. Now, if there are sales of more than 1000 items someday, that is a stress of the software. But that's okay for the software.

Now let us say, this kind of stress happens for five consecutive days in a month, and by the closing day, the entire software crashes. Now, there is no benefit of using the software even when it was able to handle stress during the sales.

This is because the stress was not enduring till the last day of the month. That is why the endurance test is a must for performance testing.

Volume Testing

It is not the case, that always the software has to deal with the small and limited amount of data. For, example, in case of software where the population has to be counted. After some days there is a requirement, that minor age groups and major age groups are to be separate.

In such cases, the software has to deal with the increasing population every day and also with different database tables. One for minors and another for majors.

volume-demo

Therefore, the data volume is constantly increasing. In such cases the, software should be able to work with data which are from different databases and which are varying time to time with respect to size.

Let us take another example of a software that calculates the traffic in a server. It is clear that the number of requests made to the server is increasing day by day. Now the data for the software is the varying number of request made to the server.

Now, the software has to handle, this large volume of data which may be related to different servers of different websites. That is why volume testing is one of the major attributes of performance testing.

Spike Testing

Spike Testing is the testing belonging to the class of performance testing. This testing is concerned with the ability of the software to handle, the spike that happens suddenly in the real world environment.

As we may see a spike in the curves which indicates the changes in the share values in the stock market. The concept of a spike here is similar in case. There can be a spike of the load in the software, and a sudden spike of the load may crash the software or hang it for some time.

This is the case when the performance of the software is compromised.

spike-demo

Let us take an example of a spike of load, there is software is a firm where the software is used to back up the CCTV footage. Every day the CCTV is active for 2 hours and so the software address nearly with 5 GB of disk space every day.

One day suddenly, the CCVT is not turned off. Now after the back-up fills up all the disk space, and the software does not have any idea what to do next. In that case, the software may hang very badly or even may crash leading to the cleaning of all the previously saved data.

This is an example of a load which has arrived unexpectedly in the form of a spike and the software was unable to address it. Therefore, spike testing is also a major concern where it is tested how the software will deal at the time of emergency in load.

Scalability Testing

This is one of the major attributes of performance testing. Because sometime the software will be connected to a different network or place in a different environment with a totally different load, it should then be able to adjust itself into the new situation.

scalable-demo

It is important to note that, in scalability testing, the major properties like the response time, throughput, memory usage, CPU usage are taken into consideration. In scalability testing these attributes are considered when the performance of the software is measured while scaling.

The concept of scalability testing is wider than all other testing which contributes to performance testing.

Scalability Testing

The process of Performance Testing

The process of performance testing is not the same for all types of software. For some business purpose, the speed may be the main concern and then the test case may be developed mainly to invoke such functions which displays how fast the application or the software can work.

Below are some steps to carry out performance testing:

Analyzing the environment:

This is very important to understand the environment before the performance test has to be carried out. The environment means, the hardware, the softwares, the add-ons, plug-ins and all the updates which are necessary to carry out the test.

Right software in the wrong environment or wrong hardware may produce bad results.

For example, let us take an example of Android Studio, for which the minimum requirements are 8 GB RAM, and CPU clock speed should more than 3 GHz. Now in this case, if we install the software in a system which has 3GB of addressable memory than the actual performance can never be measured.

While similar in the case, like if we install a calendar application and run on an i9 processor with 12 GB of addressable memory, that may also slow the system, because CPU Clock cycle will get empty feedback.

Therefore, we should be very much clear about what environment is required.

Fix the Acceptance Point

It is not like that, you can expect super level performance from all the software. The build has to be analyzed and the acceptance point has to be fixed as a point of satisfaction of performance.

For example, for software which converts .mp4 file into .mp3 format. We can expect, the conversion at a speed up to 500 KB/sec, depending on the modules and the functions it is using. One should not expect a data conversion in the speed of 10MBps from the same software.

To do this, the testers are given a set of criteria and boundary values which they can use while testing. This testing and acceptance criteria is the fixed point for the acceptance testing, and the tester should not expect more above this.

The other way to fix the acceptance criteria is to keep the similar kind of application aside and analyze the performance of both the application, parallelly, given that, the system configuration and the software build and the test case is almost same, and staring at the same time.

Plan the test

The test should be a planned one, keeping in mind that the end-user is going to perform the test, and thus they may choose a different option at a time, which may create a chaotic scene for the software, and subsequently the software may be confused to produce different results.

For example, in the case of a web application, after inputting the credentials, we tap the login button.

Now in this case, if one of the fields is not filled accurately, and the login is tapped for multiple times, the software may not get the time to validate and directly block the account for the three consecutive requests made by the login button which is not valid.

Review:

This is the phase where the test is reviewed and the degree of efficiency, usability, and scalability, etc are also reviewed.

Installation Testing

Metrics for Performance Testing

Below let us discuss the different metrics which are considered while carrying out the performance testing:

  • CPU Usage: This is the main attribute, as the CPU is the core part of the system, thus its usage minimally is the main concern for any software to be efficient. The software must not produce fake threads and request to make the CPU busy, leading to slowing it down.
  • RAM or Addressable memory: The same is for the case of the memory. This is also a core part of the hardware. The RAM or the addressable memory for the software must be used with proper utilization and should be cleared from time to time to avoid system hang or situation of running out of space.
  • Disk Space: Disk space is always much larger compared to the RAM or the system's addressable memory. However, this is also a limited resource, and thus be properly utilized by the software.
  • Network Bandwidth: In any network topology or arrangement for a definite protocol the bandwidth is fixed. This is the duty of the software that uses the bandwidth with limited speed and throughput with the proper algorithm and using multiplexing of channels to avoid overlapping and drowning of speed.
  • Response Time: This is the most important attribute for any software to be efficient. The response time as defined earlier is the time for the
  • Hit Ratios: The hit-ratio is the number of a hit to the number of the miss for the access of the software.
  • Active Sessions: There can be sessions which the software creates for the user which are not active, that is the sessions which look real. Therefore, the active session one of the core metrics for performance testing, as the user is able to work in the active sessions only.
  • Thread Count: This is the number of the individual request from the application which can be handled by the CPU itself at a time. Therefore, this is one of the core metrics for performance testing.
  • Throughput: Throughput is the number of request/transaction. queries the software can handle at a time. This is a major contributing metric performance testing.
  • Garbage Collection: The most important and the most negligible one, is the Garbage collection. But, by the end of the day, this is the only module which helps in cleaning the memory the most.
  • Roll Back Model: The RollBack model, is a core part of any software, but there are many software developers who are not engaging themselves much with this functionality. Rollback means the capability of the software to turn back into its normal state itself, in case of incomplete work or system failure or for security.
  • Page faults/ second: This means when the software is searching for its content in the pages (its assigned memory locations) and does not find the page, then it is called a page fault. Now, there can be any number of page faults, but when the number exceeds the normality, then it becomes a major concern.
  • Virtual Memory used: That is the memory space created by the software when the RAM or the primary memory is unable to hold the amount of data that the software needs. Therefore, this is also an important factor, that the software must be capable of creating virtual space for its smooth run.

Ad-hoc Testing

Summary

Performance testing is a software testing type in which all the performances of the software is tested. When we talk about performance, it means that load-bearing capacity, efficiency, speed, etc.

Performance Testing is necessary, as without testing the performance when the software is deployed in the practical field, no one can assume what can be the outcome. The software may perform better than expected or it may crash.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions