Performance Testing
What is Performance Testing
Performance Testing is a type of Testing, where we check the performance of the Software Application. Now, What are the factors that we need to test to decide, whether the Performance of the Software Application is good or not. The Factors are following
- Speed – This factor determines that when we try to access the Software Application, the application responds fast.
- Response Time – This factor is same like Speed. Response Time is the time taken by the Software Application for responding to any action. If we try to access the Software Application, then how long does it take to launch the Application is called Response Time.
- Stability – This factor determines that the Application doesn’t crash and works well, if more number of users are trying to access the Application.
- Scalability – This factor determines the maximum user load or Volume that the Software Application can handle. User load is nothing but the number of users. Volume is nothing but the Amount of data stored in database.
Type of Performance Testing
There are different types of Performance Testing and we have listed them below.
- Load Testing
- Stress Testing
- Volume Testing
- Scalability testing
- Spike Testing
- Endurance Testing
Load Testing
Load Testing – Load means number of Users. So, Load Testing means, testing the performance of a Software Application when different different numbers of users try to access the Software Application at the same time. We have to measure the speed and the response time of the Software Application under varying load.
So, Let’s take an example of an eCommerce Website, and let’s say when 100 users are trying to access the website at the same time, then if we search for a product, then we get the results in 2 seconds, and then if we try to add the product to Shopping bag, then also it takes 2 seconds, and then if we click on checkout button, it takes 2 seconds of time to navigate to checkout page, and then we enter shipping address, billing address and enter credit card details, and then if we click on place order button, then it takes again 2 seconds of time for the order to get created.
Now, Let’s see the performance of the Website under varying load.
Load | Product Search | Add to Shopping Bag | Navigate to checkout | Order Placement |
100 | 2 seconds | 2 seconds | 2 seconds | 2 seconds |
500 | 3 seconds | 3 seconds | 3 seconds | 3 seconds |
1000 | 4 seconds | 4 seconds | 4 seconds | 4 seconds |
10000 | 7 seconds | 7 seconds | 7 seconds | 7 seconds |
20000 | 10 seconds | 10 seconds | 10 seconds | 10 seconds |
So, this way, we can see that how our eCommerce Website perform under varying load. The Speed of the website is more when the load is less on the Website which means the Website responds quickly and it’s response time is less. But, when the load increases on the Website, then the speed of the website decreases, which means the website responds slowly and it’s response time is more. So, when the load on the site is less, order creation is happening very fast, but when the load in the site is more, the order creation process is taking more time.
So, this is how Load testing is done for a Software Application.
Stress Testing
We had seen in Load testing, the system performance keeps on reducing with increase in load. What happens when the load increases too much to handle. We might have some serious issues if it happens.
- Our Website might crash.
- Our Webpages might not respond.
- Orders creation won’t take place.
So, when we test the performance of our website for these conditions, then we say that we are doing Stress Testing. So, Stress Testing is a type of testing, where we test the performance of our website above the maximum permissible load.
Stress Testing helps us in identifying
- How will system behave under this extreme condition.
- When will the system fail.
- When will the system recover after failing.
Volume Testing
Volume testing is used to test the performance of a software with huge amounts (large volume) of data.
It is also known as flood testing.
When we “flood” the database with data and test the performance of the software, then it is known as Volume testing or flood testing.
As part of Volume Testing, it needs to be ensured that
- the System is able to store large volume of data.
- Users are able to retrieve the correct specific data from that large amount of data.
Scalability testing
Scaling means growth. These days, we hear this term alot due to startups. Any business that grows at a rapid speed in terms of revenue, market share and customer aquisition, with in a very little time, It is said that the business has scaled up, So scaling means growing.
If there are 10 modules in a system, and the memory usage is equal for all the moduls in normal condition, then our system should be adjusted so that the bandwidth allocated for 1 module can be used for others, if only few modules are being used, and remaining are not being used.
Scalability testing is done to check the performance of the software when
Large number of users try to access the system, which means, when the load is more. Load Testing.
Lorge Volume of data is stored in the database, and we need to access the data. Volume Testing.
Large Amount of Transactions are taking place. Stress testing
So when the Load Testing, Stress Testing and Volume Testing is done together, then it is called Scalability Testing. But Scalability Testing does one more thing and that is, finding out the solution to the problem.
Spike Testing
When we test the Software Application for a sudden over load condition in different different time interval, then it is called Spike Testing. This is a type of testing where the load increases or decreases on the software application suddenly.
Like if we tested an eCommerce Website for 5000 users in morning time for 10 minutes. Then we tested it again for 15 minutes with 7000 users in noon. Then we tested it for 8000 users for 20 minutes in evening, and so on.
This type of testing helps in identifying the system performance when a drastic load changes on the software system.
Endurance Testing
When we test the performance of a Software Application under normal load or over load condition for an extended period of time, then this type of testing is called Endurance Testing.
This is also called Soak Testing.
This is also called longevity Testing.
Endurance testing is performed at the last stage of the performance run cycle.
Endurance testing is done for several hours or even days.
Endurance testing is different from load testing.
Load Testing is done for just couple of hours.
Endurance Testing is performed in order to find out
- System performance when the system is used for a long period of time under normal load or over load condition.
- Memory usage and leakage.
- System speed and Response Time.
Example of Performance Testing
So, Lets take an example of an Indian website irctc.co.in . Everyday, during 10 to 11 AM and during 11 to 12 AM, we are allowed to book Tatkal Tickets. Tatkal is an Hindi word, which means Urgent. So, Tatkal Ticket is a facility to book urgent tickets for people who couldn’t book their tickets earlier or who couldn’t plan their travel earlier. So, there is a limited time available, limited slots of tickets available as part of Tatkal Ticket Scheme, and when people try to access the irctc website during this interval, the website speed reduces drastically, and the response time increases a lot. So, during this time, the irctc website performance reduces a lot, and in some cases, the irctc website doesn’t allow you to login due to such traffic. This is an example of Stress Testing.
Let’s take an example of any eCommerce website like flipkart or Amazon, During normal time, the traffic on the website remains normal but during sale on the website, or during the festival time, like Diwali or Christmas, the traffic on the website increases drastically, and if the website doesn’t have the capacity to handle such great amount of traffic, the website performance might reduce or the website might crash as well. This is an example of Load Testing.
Let’s take an example of a banking System where, when a financial year ends, finance teams have to work hard and long to finish their reports. This usually takes a week or more. So, during this long period of time, more people use the banking application than usual. So, during this time, the load on the banking systems will more than the usual load and for a very long time such as for a week or 2, So the bank has to make sure their systems can handle the extra load for this long period of time, without slowing down, breaking down. This is an example of Endurance Testing.
Let’s take an example of YouTube. Around 3.7 million new videos are uploaded to YouTube every day. This is around 271,330 hours of video content based on an average length of 4.4 minutes. This is really a large volume of data and YouTube has to make sure that this data is stored properly and every one should be able to access it anytime. This is an example of Volume Testing.
So, with the above examples, We can say the Performance Testing is very important.
Importance of Performance Testing
Performance Testing is very important, because it can help in
- Increasing revenue and profits – When the system doesn’t give any performance issues, then more number of users interact with the system and this increases the revenue and profits of the business. When we are able to place orders during festival seasons like Christmas or Diwali, then it gives more revenue because a lot’s of people do shopping during festival season.
- Enhancing user experience – User experience enhances when the system doesn’t give any performance issues, when we are able to navigate to all the modules of the system easily, then we always have a very pleasant experience with the Software Application.
- Enhancing quality of the software – Quality of the Software enhances when performance testing is done, as try to enhance the response time, speed of the Software when it deals with the increased load and a large volume of data.
- Measuring stability of a program or device under peak conditions – We ensure that the system remains stable when it deals with the increased load and a large volume of data. This way, performance testing measures the stability of the system.
- Reducing Cost – Performance Testing prevent the failure that might happen in production due to heavy load or a large number of transactions happening, thus it reduces the cost of fixing a defect in production because the cost of fixing a defect at later stages is very high.
Performance Testing Tool
Importance of Performance Testing Tool
So, We have seen if we have to do performance Testing for a system, then we have to do it for a
- Heavy load – Heavy Load means more number of users, If we want to test a Software Application for 1000 users, or 10000 users, then any company can’t hire these many people just to do Performance Testing, So it becomes essential to do Performance Testing using some automation tool, where we can generate a virtual load of 1000 users or 10000 users to do Performance Testing.
- Large Volume of data – We had seen in the YouTube example that around 3.7 million new videos are uploaded to YouTube every day, and if we have to do this manually, then we need to hire thousands of people to do this task only, and no company can hire these many people just for uploading videos, So in order to test this, We need some automation tool.
- Large number of Transactions – In order to test a performance of an eCommerce Website, we need to test, if we are able to thousands of orders within a span of 10 or 15 minutes, if we try to do it manually, we will need a lots of people whose job will be just creating orders, and no company will hire these many people just to create orders, So we will need some automation tool to do this job.
So, We can see, It is very important to use an automation tool to do Performance Testing. Now, Let’s see, what type of automation tools, we will need, in order to do Performance Testing.
Type of Performance Testing Tool
Few Performance Testing Tools are
- Load Runner
- Neo Load
- Jmeter
Summary
We have covered below topics in this session.
- What is Performance Testing
- Type of Performance Testing
- Example of Performance Testing
- Importance of Performance Testing
- Performance Testing Tool
- Importance of Performance Testing Tool
- Type of Performance Testing Tool
Question
Why is performance Testing so important for any organization ?