Introduction to Performance Testing

Introduction to performance testing

Did it ever happen to you that you get to access the university website to check your grade and then find out that the site is down? You then keep refreshing and refreshing and nothing works. So, why does this happen?

The most common reason that Your university website went down is that there is a huge load on it by the students at the same time the moment of releasing the semester grades, which lead to this failure. So, how do we avoid such a situation in the future? 

In this article, we are going to discuss a very useful type of testing called performance testing which helps us determine how the system will behave under a relatively huge load according to responsiveness, stability, reliability, and scalability. Also, we are going to discuss:

  1. What is performance testing?
  2. Performance testing parameters
  3. Types of performance testing
  4. Load generation concept

What is performance testing?

  • It’s a systematic type of software testing that validates the performance of a system under load.
  • It’s a type of non-functional testing and it is the most important quality in non-functional requirements.

Performance testing parameters 

 When we talk about the word performance testing, we mean one of three things:

  • The behavior of the time: The time that the system responds to my request. It’s the most common objective of performance testing. It examines the ability of the system to respond to user inputs within a specified time & under specified conditions.
  • Resources utilization: You might develop a very good application, but when the user downloads it on his mobile phone it uses a lot of memory or allocates a huge part of RAM. So, this factor should be put into consideration.
  • Capacity: How many users can this system handle before either performance or stability becomes unacceptable?

Types of performance testing 

Performance testing parameters 

 When we talk about the word performance testing, we mean one of three things:

  • The behavior of the time: The time that the system responds to my request. It’s the most common objective of performance testing. It examines the ability of the system to respond to user inputs within a specified time & under specified conditions.
  • Resources utilization: You might develop a very good application, but when the user downloads it on his mobile phone it uses a lot of memory or allocates a huge part of RAM. So, this factor should be put into consideration.
  • Capacity: How many users can this system handle before either performance or stability becomes unacceptable?

Types of performance testing 

Load testing 

Focus on the ability of a system to handle increasing levels of anticipated realistic loads resulting from transaction requests generated by controlled by a controlled number of concurrent users or processes. Realistic loads means that we test the system on a real-life number of users that are most likely predicted to access the system. (Not a very huge or very small number).

Stress Testing

Stress testing is a load test, but we are applying a higher-than-expected workload that exceeds the realistic workload that we talked about above. You can steadily increase the load to see where the system going under test begins to violate its non-functional requirements. You can use this “tipping point” to describe the capacity of the given system, like “we can handle 1000 simultaneous users per application server before we begin to violate our quality requirements”.

Scalability Testing

It answers the question “How effective can I grow?. It informs you how well and how far your system will scale by adding resources.

Spike Testing

Spike testing can be used to examine how well your system can handle sudden traffic spikes. It can be good preparation for a planned marketing campaign. Spike Testing can tell you if you are making good use of the elasticity of the cloud when faced with these kinds of events.

Soak Testing

It is also a load test where you hold the load over longer periods to look for long-term effects, like memory leakages, disk space filling up, etc. The duration of a soak test depends on your system situation and the environment that it will be put. Usually, a soak test runs for a couple of hours.

Configuration Testing

It is a software testing technique in which the software application is tested with multiple blends of software and hardware to evaluate the functional requirements also to find out the ideal configurations under which the software/the application works without any defects.

Load generation concept

Now, you probably know the importance of such type of testing in any software system. But how do we apply this load? Do we hire a bunch of freelancers to do this job for us? what is the best way to do it? We have four types to apply load on the system. Each one of them has its Pros and Cons.

User Interface 

This is a suitable approach if only a small number of users are to be represented. It can be done using the user interface whether manually or using a tool, a scripting tool.

Crowds 

In this case, we need a large number of real users to access the website or the server, – The advantage of this is that we can have these users access our system from different geographic locations. 

Maybe, one of them is from the USA, one from England, one from Egypt, one from India. So, we take the perks of having a variety of users. This of course costs a lot because you need to hire a large number of people and this number of people will require a huge budget.

APIs

If you need to test from the crowd, then in this case you need your application to be already launched or live so that these Users can access it. This puts us in front of a security concern in this case.

Meanwhile, using postman, for example, we can send API requests to the server. This is good in that this way is less sensitive to changes in the UI. If the design of the website, the user interface, and the photos that appear have changed. We don’t have a problem. We just send a request directly to the server, an API request.

 Communication protocols

But here in all three types, we have a small problem. There is time that is consumed before accessing the database. Whether this time is used in the UI or in the API request that is sent. But what if we can create a request that talks to the database directly.

For example, we have some request that is called JDBC, this request directly talks to the database without an API, without a user interface.

So this way, we can test the application more thoroughly.

And the response time is the response time of the database only, not the API request, or the UI request. And also, in this way we can create a request with a huge number of users, for example, we need to test using 100,000 users.

Eventually, depending on the project, the type of the project, the scope of it, and the budget that we have, we should choose the proper way to perform performance testing.

Latest Posts