Prepare for JMeter interview with our comprehensive list of interview questions. These interview questions are designed for both beginners and professionals. We will start with fairly simple questions and move to the more advanced level as the post progresses.
Ques.1. What is Performance Testing?
Ans. Performance testing is a non-functional testing in which application's performance is evaluated under expected or higher workload.
Ques.2. What are the different types of Performance Testing techniques?
Ans. The different types of performance testing are-
Ques.3. What all activities are performed during performance testing of any application?
Ans. Activities performed during performance testing-
Ques.4. What is JMeter?
Ans. JMeter is an open source performance testing tool developed in Java. It can be used for performance testing of web based applications, web services, FTP, Databases etc.
Ques.5. Why should we choose JMeter tool for performance testing?
Ans. The advantages of using JMeter tool for perofrmance testing are-
Ques.6. What are some features of JMeter?
Ans. Some of the features of JMeter are-
Ques.7. What kind of applications can be tested using JMeter?
Ans. The different kinds of applications that can be tested using JMeter are-
Ques.8. Explain parameterization in JMeter?
Ans. Parameterization is process of parameterizing the user input or other test inputs, so as to use different values for different users and loops iterations. Example - an external csv file can be created with multiple login credentials and then passed to the load test script in order to fetch different credentials for each iterations. [For more details, refer to the post- Parameterization in JMeter]
Ques.9. What is correlation?
Ans. Correlation is the most important aspect of scripting in JMeter. It includes fetching dynamic data from preceding requests/calls and passing them to the subsequent requests as parameters. Example - we can extract the values of session variables from the response of the request with login details and then pass those values to the subsequent requests (thus handling the sessions). [For more details, refer to the post- Correlation in JMeter]
Ques.10. What is a Test plan?
Ans. A Test plan in JMeter is a logical container that contains all the test elements which drives the performance test. Some of the different elements in a test plan are - Thread Group, Samplers, Timers, Assertions, Listeners etc.
Ques.11. What is a Workbench?
Ans. A Workbench in JMeter is a temporary area of storage for the test elements. It also contains non-test elements like HTTP Proxy Server, which can be configured to record scripts via browser in JMeter. Any element placed in workbench doesn't get saved after with the testplan's jmx script.
Ques.12. What is a thread group in JMeter?
Ans. A Thread Group is an element of JMeter test plan that represents a pool of virtual users performing a set of operations.
Ques.13. What is ramp up period?
Ans. At the beginnning of load test of an application instead of putting all the users live, we slowly ramp up the number of users in order to study their effect in the application's performance. In JMeter ramp-up period defines the time period within which the all the specified users get in running state.
Ques.14. What are samplers in JMeter?
Ans. Samplers are used for sending different types of requests to the server. Some of the commonly used samplers are - HTTP Request, JDBC Request, SOAP-XML Request, JUnit request, TCP Sampler etc.
Ques.15. What are Listeners in JMeter? State some of the widely used Listeners?
Ans. Listeners are used for viewing, saving of test results and also help in tabular and graphical analysis of the test results. Some of the widely used Listners are - Aggregate Report, Aggregate Graph, Graph Results, View Results Tree etc.
Ques.16. What are the different timers in JMeter?
Ans. Timers are used for halting the test execution of a thread for a certain predefined time. These timers are used for simulating the real user think time. The different types of timers available in JMeter are - Constant Timer, Gaussian Random Timer, Uniform Random Timer, Constant Throughput Timer, Synchronizing Timer, Beanshell timer, BSF Timer etc.
Ques.17. What is a Rendezvous Point?
Ans. The Rendezvous point in JMeter is used to perform spike testing. It is performed using "Synchronizing Timer" by waiting till the number of active users reach a certain specified value during the load test.
Ques.18. What are assertions in JMeter? Explain the available assertions in JMeter.
Ans. Assertions in JMeter are used for verification of certain values in the response of Samplers requests. The commonly used assertions are - response assertion, size assertion, XML assertion,beanshell assertion, HTML Assertion, XPath assertion etc.
Ques.19. What is the use of Configuration elements?
Ans. Configuration elements are used for customizing the sampler requests e.g. CSV Data Set Config can be used for parameterizing the sampler requests with values fetched from external csv file.
Ques.20. What are Pre-Pocessors?
Ans. Pre-processors are test plan elements that are executed before the sampler request execution. Some commonly used pre-processor in JMeter are BeanShell PreProcessor, HTML Link Parser, HTTP URL Re-writing Modifier, RegEx User Parameters etc.
Ques.21. What are Post-processors?
Ans. Post-processors are the test plan elements that are executed after the sampler request execution. Generally post processors are used for fetching some values from the sampler response.
Ques.22. How can we run JMeter in GUI mode?
Ans. Command to run JMeter in GUI mode-
jmeter -n -t test.jmx -l test.jtl where,
n specifies that JMeter will run in non-GUI mode
-t for test script file
-l for jtl file having each sample's result
Ques.23. How can we reduce the resource requirement in JMeter?
Ans. To make the best out of the available resources and in general as a practice, following practices should be incorporated in the tests-
Ques.24. What is 90% line in JMeter?
Ans. The aggregate report listener have 90% line as one of the metric. The Apache JMeter manual describes 90% line as- "90% of the samples took no more than this time". It is actually the 90 percentile of the response times of the samples -
90 percentile = (90/100)*N+1/2 where N is the number of samples
So, if there are 10 samples then 90%line will be 9.5 or 9. It means the 9th value in the sorted list of samples (sorted according to ascending order of their response times) will be the 90%line value.
Ques.25. What is distributed load testing? How can it be achieved in JMeter?
Ans. Distributed load testing is the process using which multiple systems can be used for simulating load of large number of users. The reason of using more than one system for load testing is the limitation of single system to generate large number of threads (users). In JMeter we can do distributed load testing using the master slave configuration. [For complete steps to perform distributed load testing refer to the post- Distributed load testing in JMeter]