What is Software Performance Testing?

Software performance testing checks the actual software with specifications mentioned before it is being built. Its most basic function is to work as a diagnostic aid to locate problems in communication. Scott Barber, a famous testing expert, said that it is difficult to pinpoint an exact definition for performance testing because it works differently in different situations and other various companies.

Software performance testing
What is software performance testing?
Usually, software performance testing is performed to validate and verify quality metrics of software such as robustness, reliability, scalability, etc.
The software will be subjected to various load conditions and its response and output will be measured to find out various factors.

Typed of software performance testing

However, every company uses different types of performance tests depending upon the testing environment. Here’s a look at some of the popular performance testing:

1. Load Testing

One of the most basic types of performance testing, load testing method checks the increasing load of the software until the threshold is reached. Increasing load means an increasing number of simultaneous users, transactions, and behavior of the software under test situations.

The testing’s primary purpose is to observe the response time to ensure that the software can withstand a certain amount of load at any given time, which is why it is also called Volume Testing.

2. Stress Testing

Stress testing is another common performance testing method that checks the stability of the software when hardware including CPU, disk space, and memory isn’t stable. It is negative testing in which software is loaded with a large number of concurrent users that can’t be handled by the software.

It is a type of non-functional testing because it tests the non-functional aspects of a website or application, which is carried under a controlled situation so that it can capture uncertain scenarios and rectify them.

3. Throttle Testing

Throttle testing is a limited testing situation in which a load is tested at a limited speed to check the speed at which a website will load for users who have low network connectivity including those living in distant areas, 3G and 2G data, and using mobile internet. This testing makes use of certain tools like traffic sharpers and speed stimulators.

4. Endurance Testing

In endurance testing, the software is tested with a fixed amount of load for a long period of time to observe the system’s behavior. For instance, if the software is designed to work properly for four hours, its endurance is to be tested for double the time, which is eight hours.

This type of performance testing is used to check if there are any system fails or memory leaks. Endurance testing is often referred to as soak testing.

5. Spike Testing

Spike testing is similar to stress testing but the software is tested against load volumes and workload models for a longer time with a simultaneous increase in concurrent load.

The test is conducted for a time longer than its anticipated functioning time. Any unknown behavior is tapped and corrected at the very moment.

6. Smoke Testing

In smoke testing, the software is run on a very small load, which is much less than it can usually handle. If the test generates smoke, then the software has an error in its script.

It is one of the simplest tests used and usually the verification test that is run before the software is launched or larger tests are run.

7. Capacity Testing

As simple as it sounds, a capacity test is one in which the software is tested for the load it takes handle at any given time. When you know how many users your software can handle, you have better visibility of future events that might limit your application or website. It is a confirmatory test to avoid any future problems especially when you want to increase the volume of data.

8. Component Testing

Component testing checks the functionality of a particular part of your application or website. It tests simple but important aspects including file upload, shopping cart, email function, chart feature, or search function.

9. Peak Testing

In peak testing, you expose the software with increased load for a small time and regular peak in concurrent users to analyze how the website or application will behave in a real-life situations.

10. Scalability Testing

This kind of performance testing is usually carried out during the development of the software and just before launch. In scalability testing, you check how the website or application will program is another software is added to the server or find ways to improve loading time. The test’s primary aim is to find out at what peak the software will prevent more scaling.

Common Issues Observed during Performance Testing:

Performance tests are conducted to make sure the system is free of the fault so that it is ready to be launched in the market. Let’s take a look at some of the common issues that you might encounter during performance testing.

1. Poor Scalability

The system isn’t able to handle the desired number of load that delays loading time leading to unexpected benefits that can affect memory, CPU usage, disk usage, network configuration, and operating system.

2. Bottlenecking

This issue occurs when data flow is halted or interrupted because the website or application isn’t capable enough to handle the load.

3. Insufficient Hardware Resource

This means that there is a lack of hardware that results in memory shortage and CPUs don’t perform well.

4. Software Configuration Problem

It is a minor issue which occurs when configuration settings are set lower than the system can handle. All you have to do is adjust software configuration settings, and it’ll work perfectly fine.


Here are Some of the Best Software Performance Testing Practices:

  1. Run performance tests as early as possible in the development process, so that you can conduct small trials that are successful rather than one big that will have many problems.
  2. You should remember that performance testing is not only for the entire system but can also be used to test individual sections.
  3. You must conduct multiple tests on one part to ensure that test results are consistent.
  4. Make sure you always involve IT developers and testers in the process so that it is an all-around process and you don’t need to keep going between two departments.
  5. Before the test, make sure that you require internal/external or a combination of both is required.
  6.  Devise a high-level plan before the test
  7. Develop script for proof-of-concept for application under test
  8. Configure router configuration, database test sets, quiet network, test environment, etc.
  9. Before the actual test run a dry test to check the script is correct or not

Software performance testing process
Performance-testing-process

  1. Test environment identification-  Identify the physical test environment, tools required and the goals that need to be achieved.
  2. Identify performance acceptance criteria – Charestrisics such as response time, throughput, and resource-use goals and constraints
  3. Plan and design tests- Prepare test environment, select the desired tools, devise strategy, etc.
  4. Configure the test environment – Prepare the required resources to execute the tests
  5. Implement test design – Develop test design in accordance with test design
  6. Execute the test – Run, monitor, validate and collect the test and test data
  7. Analyze test results, make reports, and retest – Consolidate the test data and analyze it. If tuning is required do that and go for a re-test.

Conclusion
Software Performance testing is a key process that can determine the success of your software. If you wish to know how your app can perform in the real world talk to us! 

How To Do Performance Testing For Web Application Using Jmeter?

Performance testing is done to ensure whether the application is capable enough to bear the load. It can analyse the system’s performance under high load. Jmeter performance testing offers various benefits like it can be used to test the performance of both static and dynamic resources.

Dynamic resources can be JSP, Servlets and AJAX. Static resources can be Javascript and HTML.
There are two kinds of web application testing done using Jmeter.
1. Load Application Testing: The process is mainly used to predict the expected usage by simulating various conditions.
2. Stress Application Testing: Be it any web application the architecture of it can only support a certain number of users at a time. With the help of stress testing load above this capacity will be given on the server after which it behaves weirdly. By doing so, maximum load the web server can handle can be found out.
This can be understood in a much better way by below diagram:
How to create a Performance test in Jmeter
Let’s test the Google website for 1000 users with the help of Jmeter.

  • Add Thread Group

First, start the JMeter application and click on test plan option on the dashboard.          Click on add option and then Thread(Users). Afterwards, click on Thread Group.
The Flow would be:

Add -> Threads (Users) -> Thread Group

  • Enter thread properties in the thread group control panel. You have to enter a certain number of things like :

Number of Threads: Number of users which you want to target to the target website. For example, here we will use 100
Loop Count: 10 (Number of times to execute testing)

Know More: Step by Step Implementation of App Performance Test

Ramp-Up Period: 100 (It is the delay which Jmeter has to wait before starting the next user). 100 seconds is the time which we have used.
Now, you must be confused between thread count and loop count. It is very easy to understand.
Thread count means how many concurrent users Jmeter will create to connect to the web server.
Loop count would be the number of times, Jmeter would simulate one user connecting to the target server.
Suppose in the above example: Jmeter would create 100 concurrent users connecting to the server while one user would be connecting to the server 10 number of times.

  • Adding JMeter elements

There are various JMeter elements which can be used to the test case. Let’s see what they are:
1. HTTP request default
Now, you have created a thread group and you can attach HTTP request element        to it by following the below path:

Add -> Config Element -> HTTP Request Defaults.

In the HTTP request control panel, enter the website name which you have to define. In our example, it would be “www.google.com”.
2. HTTP request
You can add this element to the thread group by following below path:
Add -> Sampler -> HTTP Request.
Now, in the control panel of the HTTP request, you have to enter the URL      request you want to send to Google. If you give the command as “calendar” in path field, Jmeter will send request http://www.google.com/calendar to google server. If you will keep it blank then send request http://www.google.com/ to google server.

  • Adding Graph Result to the test output

Jmeter can show the results in graph format. You have to right click on the test plan and then follow the below path:

Add -> Listener -> Graph Results

In this way, you will be able to see the results in graph format.

  • How to run the test and get the test result

You can see the test button on the toolbar to start the testing process. You would be able to see the test result in real time. When you will simulate 100 users which will access Google server then you will get the real-time output.
But all output lines would not be in the same colour. Some would be in black, blue, red and green colours. Black colour means the total number of current samples sent. Blue colour represents the current average of all samples sent. Red colour represents the current standard deviation. Green colour represents throughout rate that represents the number of request per minute the server handled.
How to analyse the graph results in Jmeter
There are two main parameters which you should focus while looking at the result graphs. Throughput and deviation are those which are very important while looking at any JMeter output graph.

Know More: Performance Testing-Types, Stages and Advantages

Throughput is the ability of the application to handle a heavy load. Throughput should be very high ideally. Deviation indicated deviation from average. It should be very low.
In the above graph, throughput is 867/minutes. It means this server can handle 867 requests per minute. This data is of yahoo website. While if you will test Google.com then you see throughput is 1000/ minute. Google has higher throughput than yahoo.
These parameters can vary on other factors also. Which include internet speed at JMeter site, current server load at google server, your CPU power and many others. It’s not necessary that you will get the same results every time as they can vary because of other factors.
Conclusion
So start the web application testing using Jmeter and see how much load one website can handle. In this way, you can see why your site stops responding and one of the reasons can be low load-bearing capacity.

If you had some difficulty while doing the above test then try to not connect to the internet via a proxy. If you are connecting through a proxy then don’t connect via that. Try opening a new JMeter instance and then try to run the test.
By following these you would be able to run the test cases with Jmeter. So, keep doing performance testing with JMeter and make your site less prone to vulnerable attacks. All the best!!