Performance testing of any application helps in identifying the performance bottlenecks in the application and hence, considered very critical to the success of any application.
In performance testing, we not only measure the response time of the application but also several other quality attributes like - stability, reliability, robustness, scalability, resource utilization, etc.
Performance testing is a type of a non-functional software testing technique in which the performance of an application is evaluated under simulated expected or higher than expected workload. ArtOfTesting
So basically in performance testing, we try to simulate the real-world load using some performance testing tools like JMeter. These tools help us in creating virtual users that perform different operations on the application, thus simulating the actions of real-world users.
Load testing is a type of performance testing in which the performance of the application is evaluated under the expected load. In a load test, we evaluate different performance parameters like - response time, load on server i.e. throughput and the error rate observed during load test execution.
Stress testing is a type of performance testing in which the performance of the application is evaluated under the load much higher than the expected or the anticipated load. This helps in measuring the break-even point of the application - the load at which the application doesn't respond correctly.
Endurance testing is also referred to as 'Soak Testing'. In endurance testing, the application under test is subjected to continuous load for a long duration like 2-3 days. This helps in uncovering the memory leakage issue in the application.
Spike testing includes subjecting the application to a sudden burst of virtual users. This helps in checking if the application can recover from any issues after the sudden spike in the number of concurrent users.
In Volume testing, we feed the application with a large volume of data. Now, this can be done either by inserting a high volume of data in the database or depending on the application or functionality - uploading a large file for processing.
Want to know more about the performance testing types in detail along with examples, check our tutorial - Performance Testing Types.
Planning and execution of a performance test require a different set of activities that are common to every performance test irrespective of the tool we use. Following is a step by step guide to plan and execute a load test.
First of all, we select the test scenarios that are required to be performance tested. Normally, instead of picking all the functional test scenarios of the application, we only the scenarios that have very high volume or the scenarios that will be performed by a relatively large number of users. A sample test scenario can be-
Here, the Think time or the Wait time is the time user takes in going through the web page once it loads; the time taken to fill the forms like login form, user registration form, entering data in the search fields, etc. This time is variable depending on the underlying action e.g. think time while filing a large form can be over 10 seconds while Think time to just fill the login credentials can be 2 to 3 seconds only.
Once the scenarios are identified, the next step is user distribution. Here, we assign users to different scenarios. For example, while doing performance testing of an email application, we can distribute user to different scenarios like-
Scripting is done with a load test tool like - Load Runner, JMeter, Silk Performer, etc. These tools simulate the actions performed by users. We script the scenarios identified and assign users to them as per user distribution is done.
Before actually starting the load test with a predefined number of users, we do a dry run of the application assigning 1 or 2 users to each scenario and checking whether everything is working fine.
After the dry run and making sure that the scripts are working fine, we start with the actual load test. The load test can be made to execute for predefined time or iterations e.g. a load test can be scheduled for 'n' minutes or 'm' iterations per user.
After the load test execution, its result is analyzed. Some of the open-source tools might not have very good inbuilt control for the interpretation of test results. In those cases, one may need to use plugins or other tools to include more advanced or graphically intuitive interpretation.
Before starting with the different performance testing tools available in the market. Let's first see, the different criteria that need to be considered while selecting a performance test tool.
Now, let's check some of the widely used performance testing tools.
Want to know more about the tools along with their in-depth review, check our post - Performance Testing Tools.
This concludes our tutorial on performance testing. Do check our JMeter tutorial section for a free step by step tutorial for learning the most popular performance testing tool - Apache JMeter.
I hope we have covered the basics of performance testing here. I’m happy that you made it to the end of this article. So, now what?
As stated above I highly recommend, checking out our JMeter tutorial. I would love to know if the tutorials help you with your testing journey.