Friday 25 November 2016

The Overview Of Performance Testing Key Concepts - Part I !!!

Hello everyone, if you are new to Performance Testing/Engineering and you want to learn about these topics, I would like to assure that you are in the right place.

Without wasting your significant time, I will directly start with our first topic which is "The Overview Of Performance Testing Key Concepts - Part I !!!".

What is Performance Testing ?

Performance Testing is one type of non-functional testing, which is mainly required to understand any application behavior in terms of responsiveness, throughput, capacity, reliability, durability under a significant workload.

Note:- Workload may refers to number of concurrent users, number of concurrent requests(HTTP), number of concurrent jobs(Printing Job etc.) etc.

Why Performance Testing is really important ?

In today's digital world, no one is having any leisure time to wait for anyone or anything.

If you can't serve the item any customer has requested for within the timeline, you might lose any significant customer, because today there are so many options available.

For example: Let's consider any e-commerce application, There are lots of online site like Flipkart, Amazon, Snapdeal, Paytm etc. where you can purchase whatever you like.

Consider, Amazon is giving 50% flat sale on any electronic's product for 2 hours on 29th February, 2017 :P.

Assuming, on any normal day, the number of users in Amazon is 2 millions.

As Amazon is a popular brand, a sharp rise of customers can be seen during this 2 hours to buy any electronic product.
Assuming, during that 2 hours, number of customers has been increased up-to 6 millions.

Now if the Amazon application is not capable enough to handle these many number of requests, either the servers are going to crash or the response time for any product page is going to be pretty high which in turn, going to affect customers resulting to revenue loss for Amazon.

Types of Performance Testing

1. Load Testing:



Without breaking your application, you always first want to verify how many average or maximum number of users my application can support without facing any challenges.
Challenges can be for example response time of every single critical transaction(any action performed by user), resource utilization of application/web/Database server with respect to CPU, Memory, Thread, Connection,Session etc.
To measure the application performance under average/maximum number of users without facing any major challenge is called Average/Peak Load Testing.

2. Stress Testing:



If you want to test the break-point of your application, this is the right scenario for you. Stress testing is mainly done to find out the break point of any application under concurrent user-load.
Number of concurrent users or HTTP requests will be gradually increased on your application until and unless the application server(s) crash(es).
At what amount of users or requests, your application breaks that will be considered as the limit or break-point for the application.

3. Spike Testing:



Sometimes it can be seen that any application is getting a sudden burst(spike) of concurrent users for minimal duration(maybe fraction of seconds or minutes). If the capacity of your application is not strong enough to handle the sudden spike in terms of requests/users, the application server might crash.
Hence it is always recommended to prepare your application w.r.t performance for these type of situations by performing Spike Testing for your application.

4. Endurance Testing:



If you have just bought any electronic product, you may not find any problem/bottleneck with that one immediately. Once you use it for a long period of time, you may start to observe the issues(if any) with that product.
Similarly for your application, you may not find any resource leakage(Memory, Thread pool, Connection pool) if you run any average/peak load test, you have to run the test for a longer period of time like 8 hours, 24 hours, 1 day,  2 days or more to find out any leakage issue.

5. Failover Testing:


A simple architecture of a application is shown in the above picture.
Two tomcat servers (Active-Passive Clustered Nodes) will accept the incoming HTTP requests from client, but at any point of time one will be active(other will be passive i.e in simple terms, it will be shut down).
Let's suppose, due to heavy incoming traffic, first tomcat server crashes, now 2nd application server needs to be up and running as soon as possible for accepting the incoming requests from client.
So failover testing is required to test how fast it is possible to allocate extra resource and to move operations to back-up systems during the server failure due to one or the other reasons.

Please find the video link for the same discussion!!




This is all for today!! Will discuss the other key points of Performance Testing in my next blog. Then we will learn about different kind of performance testing & monitoring tools.