Load Testing Interview Questions and Answers, Performance Testing, Endurance Testing, Stress Testing

Load Testing Interview Questions and Answers, Performance Testing, Endurance Testing, Stress Testing


Hello and welcome to this video. This video is on load testing and performance testing interview questions and answers. As you may know, load testing and performance testing deal with the design and execution of tests that examine the system performance. So let us see some common interview questions and answers related to load testing and performance testing. The first question is what do you understand by system performance? System performance means the non-functional or the extra-functional qualities of the system like speed, capacity and endurance. So we may find that our system has a response time of less than or equal to two seconds, or it can support 100 concurrent users at one time or it can support 50 concurrent users for a total of 24 hours non-stop. System performance is also shown by less resource utilization, stability and accuracy. The thing is that system performance is always a comparison with respect to some standard or norm. So it may be the completing product or service in the market or it may be with respect to the existing previous versions of the product or service. The next question is what is load testing and why do it? There are many objectives of load testing. First is to find out whether the system meets the user expectations. So the user expectations may be that the system responds to the user commands within five seconds. There may be certain contractual requirements related to performance. So the purpose of load testing is to find out if the system meets those contractual requirements or not. And then another objective of load testing is to find out how well the system performs with respect to the competing products or services or the own previous releases of the product or service. The next question is: Is it possible to do performance [testing] without using any tools if so, how? If not, why not? It is possible to do performance testing by using only real physical users But that is not very effective because it may happen that we may need to have 100 users working on the system for a continuous period of 2 hours. So getting real users and assigning them computers and managing their actions for a period of two hours is not a practical thing. So performance tests typically need many users repeatedly running scripts. Maybe for a long time. So It is possible to do performance testing without using any tools. But only very limited performance tests can be done without using any tools. Most of the time we do performance testing by using the tools. The next question is: Which tools can be used for performance testing? There are many publicly available tools for performance testing.There are open source and commercial tools like Apache JMeter. HP LoadRunner and Microsoft VSTS. Different tools support different protocols. They have different features and reports and they have different license costs. In addition to the publicly available tools, we can also develop our own in-house tools and use them for performance testing. The next question is: What our virtual users? What do ramping up or ramping down virtual users mean? In performance testing and load testing, we have the concept of virtual users. So virtual users are nothing but software representations of real users. They are created and managed by the performance testing tool. Just as physical users can perform transactions on the system, virtual users can also perform transactions on the system. And virtual users are concurrent that means all of them work together simultaneously. So if there are 100 virtual users working on the system, all of them work in parallel. There is a concept of ramping up or ramping down virtual users. What this means is that instead of introducing all the virtual users instantly, the virtual users are built up gradually. This makes the performance test more realistic. Because in reality, not all the users login to the system at the same time, but they come online at different times and then that builds up all the virtual users working on the system. The next question is : What is a business transaction in load testing? Now in any system. There are some major user types. So each of these major user types has some main task workflows. These task workflows are called business transactions. For example, in the case of an e-commerce shopping website, there can be the business transaction of checkout – that involves a shopper user selecting a product category, selecting a product, adding the product to the shopping cart, submitting financial information, submitting billing information and clicking on the checkout button. So, this complete end-to-end workflow is called a business transaction. Business transactions are performed by a type of user in performance testing. We do not do the business transactions for each type of user, only the main types of users, in order to optimize on the total effort that goes into building the performance test scripts and the performance test itself. The next question is: How do you create a performance testing script? The business transactions are converted into requests and all these requests put together are the performance testing script . Each step of the business transaction, for example, selecting a product category can be put in the performance testing script as a single request or multiple requests. In addition to all the requests for each step of the business transaction, the script can also contain parameters and delays. The benefit of using parameters is that we can parameterize the script so that when different virtual users execute the script, they can execute the script with different data. We can also put delays in the script before the request. Delays make the performance testing script more realistic because real users also pause before taking any action in the system. So similarly the performance testing script can also pause for some time before sending a request to the system. The next question is: How do you create a performance test? A performance test is nothing but a container of all the performance test scripts, so apart from setting up the scripts within the performance test, we need to assign the number of repetitions each script is going to have and also, assign how many virtual users will execute that script. In addition to putting the test scripts in the performance test, we can also configure other settings of the performance test like virtual users, ramp up and ramp down and also we can schedule the test. It is also possible to run multiple performance tests on the same system at the same time either using the same tool running from two different machines or using different tools running from different machines. The entire load on the system is called the workload. The next question is: What is your general load testing approach? The general load testing approach is first, we create the performance testing scripts. Then we prepare the test data and the test environment. The test environment consists of two sections. One section is the system under test – the web server, application server and database server, may be. In the second section of the test environment is the load generators on which the performance test is going to run. Then we create the tests by putting all the scripts in it and run the tests. We run the test multiple times to see if there is consistency in the test results, and if we get consistency in thetest results, then we report the test results to the developers and other groups. The next question is : What is endurance testing? An endurance test is a performance test where we put average (or normal) load for long duration. It has a fixed number of virtual users executing repetitions of the performance testing script. The endurance test is a continuous long test. We can run it for 12 hours or we can run it for 24 hours. The benefit of running the endurance test is that it allows us to test whether the system is able to work for long periods of time without any problem or not. The next question is: What is stress testing? A stress test is not a single test, but it is a series of low tests with a load increased systematically. The purpose of stress testing is to find out the maximum load that the system can handle successfully. That means without crashing or without becoming unresponsive. We can increase the load by increasing the concurrent virtual users or we can keep on increasing the data being loaded on the system. Or we can keep on increasing the throughput of the system. The stress test is also called the torture test. And it is very useful for benchmarking.That means it gives us the upper performance limits of our system. It is also good for finding out the performance bottlenecks, which are the areas where if corrected, we can get the maximum gains in performance from those areas. The next question is: What is the importance of load generators? The load test is run on the load generator machines. So the load generator machines need to be powerful enough to create all the needed virtual users. So for example if we have to run a load test with 1000 virtual users, our load generator machine should be powerful enough so that it can create 1,000 virtual users. Then it has to be powerful enough to execute all the scripts and send all the requests to the system under test for the entire test duration. Many times when we have to generate a huge load, a single machine is not sufficient. So then we can go in for multiple load generator machines or maybe we can go in for a load generator server also. The next question is: What are performance counters? According to you, which performance counters are important? Performance counters show the resource usage on the server of the system under test. In my opinion, the important performance counters are percentage processor time memory pages per second, percentage disk time and network bytes per second. During the load test we have to watch out that the performance counters do not reach very high percentages or max out because that usually indicates performance issues. Performance counters are measured by profilers like PerfMon for windows servers. There are other profilers also available for other technologies, that measure the data related to the requests sent to the system The next question is: Can you mention a few important performance metrics? Collecting the performance metrics is the goal of load testing and performance testing. So some of the important performance metrics are response time. Response time is the time for the request to reach the server plus the time it takes for the server to process the request plus the time it takes for the response to reach from the server to the load generator. Another performance metric is latency. Latency is the time to the first byte. Response time depends on the server performance and Latency depends on the network bandwidth. Another important performance metric is the Maximum Concurrent Virtual Users that the system is able to support. And another important performance metric is the Throughput, which is the work done by the system in unit time. For example, Number of responses that the system can generate in one minute or one second. The last question is: Which data is important to provide in performance test reports? Data that is put in performance test reports needs to be carefully selected because performance test reports are circulated to different groups. So we can put the type of the performance test that we executed, for example, we executed a load test or an endurance test or stress test and we can give the settings. How many scripts were tested in the test? With how many iterations? How many Virtual Users? What were the other settings of this test? We can give the names of the performance test scripts, the test data that we used and the test environment that we used. We can list the performance metrics that we consistently noted in our performance tests like Response Time, Latency Maximum Concurrent Virtual Users and Throughput, and we can also suggest actions to improve the performance of the system. The test report should be created after consistent results are seen in the performance tests and after we have analyzed those test results. In addition to giving numbers in the performance test reports, we can give charts in the report because charts lead to easier understanding. So that is all for this video. I hope you came to know about the common load testing and performance testing interview questions and answers. So thank you for watching this video and see you in the next video.

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *