Load Testing

Load Testing:

Load Testing is a type of Non Functional Testing.

Load Testing which used to identify the system performance under real-life load condition. This process will help you out when the multiple users requesting the server at the same time.  Load testing is performed to determine a system’s behavior under both normal and at peak conditions. It helps to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation

When you take a mobile application or web application, The user does not wait for the response more than 5 seconds. If the application starts responding slowly, then the user will stop using the application or the user will be switch over to another similar application.

i.e – Let’s see the real-time scenario when you are opening the FB application and it’s taking 30 seconds to display the friend’s post or when you tap the like button and the count is not increased and the application is loading for a long time. Do you like to use the app again?

We have to check whether the server can handle the multiple requests at the same time. (i.e – There are 500 users trying to log in at the same time. We have to see how many requests are getting, whether any users got error message while login)

Real time Example:

Ticket New – The app response will be very slow If there are any big star movie tickets booking is opened in online, there are more than 1000’s of users trying to book the FDFS ticket. In this scenario, app will be crashed or app will be loading for a long time.

Result: The user might stop using the application or they will switch to book my show or some other web responsive progressive application.

Solution: Server configuration needs to be changed. No.of request per seconds should be increased so that the server will respond more fast than earlier. or There will be an option in the amazon server, the server configuration will be changed automatically during the peak time or specified time.

We have to analyze the server performance at the back end whether the CPU utilization is reached the maximum level. Distributed to load testing which helps to split the load and send the request from the different machine so that the CPU utilization will not reach the max level. 

If you want to perform the load testing using JMeter, then I would suggest you to run the script through command prompt and try to use less listeners and it will consume less system resource requirements.

Why Load Testing:

Related image

  1. Identify potential bottlenecks of your application
  2. Discover the number of concurrent users that can access your application without a heavy degradation of the user experience
  3. Find out the breaking points of the technology stack used by your application
  4. Find your application’s behaviour under load
  5. Check the time it takes for your server to respond to clients and understand if your website loads in a decent amount of time
  6. Find out how slow the APIs or any other web service respond under heavy load
  7. Understand if the database technology or the connections to the databases (Postgres, Redis, Mongo etc) represent a bottleneck in your application
  8. Find out if the changes done in each release had a bad influence on the performance behaviour of the application.
  9. Discover hardware issues or hardware/VM related problems, like limitation on the number of threads or file descriptors configured on the system
  10. Know how many parallel users your website can handle

   Load testing can be done by below tools,

     (i) Jmeter – Open Source Tool

     (ii) Blaze meter – Paid Tool

     (iii) Artillery.io (Node JS plugin) – Open Source 

NOTE: There are more no of tools available in the market. MNC will prefer to use paid tool since it will reduce the human effort, Distributed Load Testing, easy report generation and simple UI.  

Need Of Load Testing:

We have to check with the client that How many users can be expected to log in within an hour. Based on that we have to create the virtual user and request the server.

When the client is expecting a large no.of user base, then we have to update the server configuration based on it. 

  For example, while looking at Naukri for a given average day, during a peak hours 2000 visitor may come in 1 hour and the user will spend around 5 – 10 minutes in the web site. We have to calculate this scenario like below,

  • 2000 visitors in 60 minutes
  • 10,000 page views
  • avg page views 5
  • avg time on site 7 minutes

Where:

U is the number of load test virtual users (that’s what we are trying to figure out)

V is the average number of visitors per hour

D is the average duration of a visitor

60 is the number of minutes in an hour

Example Calculation to create the virtual users:

2000 users in 1 hour (60 minutes), 7 min time on site

60 minutes / 7 min = 8.5

2000 / 8.5 = 235 Users

U = V / (60/D)

 

Leave a comment