JMeter Interview Questions

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-

  • Load Testing - Type of performance testing to measure the application behaviuor under expected workload.
  • Stress Testing - Evaluating application's behaviour under load higher than application's threshold or peak load conditions.
  • Endurance Testing - Testing application under prolonged load test, usually used to detect memory leaks in application.
  • Spike testing - Evaluating application's behaviour on sudden increase in the number of users.
  • Volume testing- Testing the application with large amount of data(usually with large records of data in the database).

Ques.3. What all activities are performed during performance testing of any application?
Ans. Activities performed during performance testing-

  1. Create user scenarios
  2. User Distribution
  3. Scripting
  4. Dry run of the application
  5. Load test execution
  6. Result Analysis

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-

  1. It is free to use with zero licensing cost.
  2. It is open source, anyone can customize it for their specific use.
  3. It has good online community support and tutorials.
  4. It supports performance testing of wise variety of applications rangin from websites, web services to FTP and Databases.
  5. It is easy to learn and use.

Ques.6. What are some features of JMeter?
Ans. Some of the features of JMeter are-

  1. JMeter is 100% Java based. So, it has all the advantages of Java based applications like portability, extensibility, robustness etc.
  2. It has record and play back feature that ensures easy and fast creation of test scripts.
  3. It provides different listeners to capture and analyse the test results in both tabular and graphical format.
  4. It can be used to load test different protocols- HTTP, HTTPS, FTP, LDAP, TCP etc.

Ques.7. What kind of applications can be tested using JMeter?
Ans. The different kinds of applications that can be tested using JMeter are-

  • Websites
  • Web services both - REST and SOAP
  • Databases(JDBC)
  • Shell scripts
  • FTP
  • LDAP
  • TCP
  • SMTP, POP3, IMAP

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-

  • Use non-GUI mode: jmeter -n -t test.jmx -l test.jtl
  • Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
  • Don't use "View Results Tree" or "View Results in Table" listeners during the load test, use them only during scripting phase to debug your scripts.
  • Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. Or perhaps use the Access Log Sampler. [The Include Controller does not help here, as it adds all the test elements in the file to the test plan.]
  • Don't use JMeter's functional mode during the load test executions.
  • Use CSV output rather than XML.
  • Only save the data that you need.
  • Use as few Assertions as possible.
[ source: JMeter Best Practices by Apache]

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]