Top JMeter Interview Questions and Answers

By Vijay

By Vijay

I'm Vijay, and I've been working on this blog for the past 20+ years! I’ve been in the IT industry for more than 20 years now. I completed my graduation in B.E. Computer Science from a reputed Pune university and then started my career in…

Learn about our editorial policies.
Updated March 9, 2024

List of Most Frequently Asked JMeter Interview Questions And Answers to Help You Prepare For The Upcoming Interview:

JMeter has become quite popular in the Software Testing industry within a very short span of time. Jmeter is a java application that is built by Apache.

Experts consider Jmeter to be the best open source load testing tool that can be used to measure the performance of an application. This article concentrates more on all the prime concepts of JMeter which you need to be aware of.

This article includes a set of most popular JMeter interview questions and answers along with examples in simple terms, which in turn will enable you to understand the concept better and thereby help you to clear any interview successfully.

Top JMeter Interview Questions and Answers

Most Important JMeter Interview Questions

=> Further reading: Read our Complete Free JMeter Tutorial series here.

Q #1) Explain the architecture of JMeter.

Answer: Jmeter is a Java-based open-source application that is basically designed for the purpose of Load Testing. It supports all major protocols that are supported in Load Runner. Unlike any browser, JMeter works on levels of protocols and does not execute JavaScript present in HTML web pages.

Q #2) Does JMeter simulate actual browser behavior?

Answer: No, JMeter does not support the actual browser behavior. It does not render the HTML webpages as the normal browser does. The response can be viewed in HTML format but the actual timings are not present in the generated samples.

Q #3) What is Distributed testing?

Answer: Distributed Testing means using multiple machines for load testing in which one of the machines can be made master and others can be kept as a slave. It is very important to note that all the machines should be on the  same network and should have the same version of Java and JMeter

Q #4) What is the use of Regular Expression in JMeter?

Answer: Regular Expression is used for extracting some values dynamically from the responses. These values can be used in the subsequent request or can be saved for reporting purposes. Regular Expression is used in both Pre-Processors as well as Post Processors.

Q #5) What are the types of processors in JMeter?

Answer: Basically there are two types of processors in JMeter namely Pre-Processor and Post Processor.

Pre-Processors execute before the main sampler and can change the scope of the sampler whereas Post Processors execute after the main sampler and are applicable to all samplers in the same scope of Test Plan. They can be used to extract some fields from the server response and store them in variables.

Q #6) What are the different ways of Data Parameterization in JMeter?

Answer: Data Parametrization makes the scripts reusable where the values is not required to be hardcoded for the same request with different parameters.

Below is the data parametrization that is supported in JMeter:

  • CSV Data Set Config
  • User-Defined Variables.

Q #7) What are the maximum recommended threads on a single system?

Answer: It depends on the hardware configuration of your system which includes a processor, JVM, allocated memory -Xmx, etc.

Other factors that impact thread count are the number of components in your test plan i.e. the number of config elements or processors and it also depends on whether you are using GUI/Non-GUI Mode.

Q #8) Explain the difference between Gaussian and Poisson Timers.

Answer: Both Gaussian and Poisson Timers work on a mathematical formula with some constant delay and additional offset. Difference between the two lies in the fact that how the lambda value is calculated in the case of Poisson timer and how deviation is calculated in the case of Gaussian Timer.

Q #9) What are the major differences between JMeter and Load Runner.

Answer: JMeter is considered as the major competitor of Load Runner in the industry. Enlisted are some of the major differences:

Load RunnerJmeter
Licensed SoftwareOpen Source tool.
Developed by MercuryDeveloped by Apache.
UI is very impressiveIt lacks in UI
It has more technical capabilities.Less technically sound as compared to Load Runner.
Supports SAP, Siebel and Peoplesoft.Doesn’t support SAP and Siebel

Q #10) What is the use of co-relation in JMeter?

Answer: Co-relation is a process of extracting the values from the server response and storing it in a variable to be used in any other request which is to follow.

For Example, for testing any login functionality if you have to use the session ID/cookie ID, you can extract the values from the response of GET Request of the login page and then dynamically use the same while making POST request for a login.

Q #11) What are the different types of listeners?

Answer: Listeners are used for storing the execution results of load testing in different forms be it in a table, graph, tree or in any other presentable format so that it can be presented to the client. There are different type of inbuild listeners in JMeter and many others can be imported into it by using plugins as per the requirement.

Some of the inbuild listeners are:

  • View results in Table
  • View results in Tree
  • Graph results
  • Aggregate graph
  • Aggregate report
  • Assertion results
  • Response time graph

Q #12) Explain the flow of the Test Script Recorder.

Answer: HTTP(s) Test Script Recorder is used to record all the Http(s) requests going to the server from your application. Some configurations require to be done in JMeter in order to make it work.

The steps followed to record https traffic is:

  • Add HTTP(s) Test script recorder to WorkBench.
  • Enter the port number to start your proxy server.
  • Choose the target either as “Workbench” or add a Recording Controller in your test plan and select the same target for storing all the recordings under it.
  • Start the proxy server.
  • Configure your browser with manual proxy settings pointing to the same port number used in the test script recorder.

Q #13) Can JMeter record actions from mobile? If yes, how?

Answer: Yes, JMeter can record HTTP or Https request going to the server from your mobile application also. It is required that mobile and JMeter are on the same network.

Below is the configuration required:

  • Configure your proxy server in JMeter to run at a specified port.
  • Set up the proxy on your mobile wifi settings and enter the same port number that is used in the recorder.
  • Install the Root CA certificate on your mobile.
  • Hit server requests from your mobile and observe it getting captured by the specified controller.

Q #14) How to do master-slave configuration in JMeter?

Answer: Master-slave configuration is a part of distributed testing in which more than one machine is used to perform load testing of the server under test.

It is very important that all machines are on the same network and all have the same version of JMeter. In distributed testing, one machine is considered the master, and the others are kept as slaves by doing some configurations.

The process is specified below:

  • On the master machine, edit the JMeter.properties file and add the IP addresses of slave machines against the remote_host field in the file.
  • Save the file and open the JMeter again.
  • Now, from the RUN menu in JMeter, select Remote Start and choose the IP of the machine to be invoked.
  • Choose RUN menu and select Remote Start all to start all the slave machines for your testing.

Q #15) What are the JMeter supported protocols?

Answer: JMeter supports various standard protocols like:

  • HTTP/HTTPs
  • SOAP
  • LDAP
  • FTP
  • SMTP
  • TCP

Q #16) Explain the syntax of JMeter variables and functions.

Answer: Just as in any other programming language, variables and functions are used in JMeter also in order to make the scripts reusable.

Syntax of Variable – ${var}

There are many inbuilt functions that are available in JMeter to perform various actions. Function string can be generated from the Function Dialogue Box itself.

For Example, if you want to get the machine IP stored in a machineIP variable, you can use the string ${__machineIP(machineIP)}.

Q #17) Why is it recommended to run JMeter in GUI mode?

Answer: JMeter tests can be run both GUI as well as Non-GUI Mode. It is highly recommended to run the load test in Non-GUI mode because the AWT event thread can kill the tests in case of high load scenarios.

The various Non-GUI mode supported with JMeter are:

  • Command-line
  • ANT plugin
  • MAVEN plugin
  • Jenkins

Q #18) Is it possible to run selenium scripts in JMeter? If yes, how?

Answer: Yes, it is possible to run selenium scripts in JMeter to get some ideas on their performance.

There are two ways of doing it. Either you can use JUnit libraries to build selenium scripts and save as Jars and copy the same in the JMeter directory. And then add JUnit sampler to your test plan and import the Jar file.

Otherwise, the Webdriver sampler plugin can be added in the JMeter ext folder. Restart the JMeter. Write your selenium code in the Webdriver sampler and then execute it to see the performance.

Q #19) How do you manage sessions and cookies in JMeter?

Answer: Sessions and cookies can be managed in JMeter by using config elements such as HTTP Cache Manager which provides an option to clear the cookies in every iteration and also allows to add user-defined cookies.

HTTP Cache manager helps you in clearing cache after each iteration as per your requirement in the load tests and also limits the number of elements that can be stored in the cache. Both of these config elements can be attached to the HTTP sampler.

Q #20) What are the important steps for testing JDBC requests?

Answer: JDBC requests are used to establish a connection with the databases and then measure the response time of the queries.

Important steps for testing JDBC requests are:

  • Setting up Config Element, JDBC Connection configuration in which Database URL and JDBC Driver Class needs to be added as per the database which is being used. Also, add the variable name for this connection configuration so as to use it in the sampler.
  • Add JDBC Request. Add the same variable name added above and write your queries to the test.

Recommended reading =>> JDBC Interview questions with answers

Q #21) What is BeanShell scripting?

Answer: BeanShell is a lightweight Java scripting that is used in JMeter to perform some complex tasks. BeanShell sampler can perform various functions with the use of coding. You can print the thread number, get the current sampler executed, fetch the cookies, etc.

Q #22) Can JMeter measure the performance of a complete application? For Example, you have multiple screens in your mobile app. Can JMeter measure the time taken to flip the screens?

Answer: No, JMeter does not measure the transition time between the screens. It can only measure the server actions, not the UI interactions.

Q #23) What is a Root CA certificate?

Answer: HTTPS connection requires a certificate to authenticate the connections which get established when the browser hits the webserver. JMeter generates it temporarily to intercept the SSL traffic in order to record the actions. For recording actions via mobile, you need to have this certificate on your mobile to record the actions.

Q #24) Which factors decide the maximum threads that one should generate per system?

Answer: It depends on the hardware of the system.

For Example, on a 2-3 GHz CPU, 400-600 threads can be generated. It also depends on the components in your test plan. More the processors and XML parsing elements, the more the CPU load and hence fewer threads. For high load, it is recommended to use multiple machines for load testing.

Q #25) What is a Workbench and why is it required?

Answer: Workbench is a storage area for adding some components which can be added to the test plan if required.

Components of workbench do not get saved with the test plan automatically. They have to be saved separately as test fragments. A most important part of the Workbench is HTTP(s) Test script recorder which is highly useful in recording the HTTP request and later load can be applied to+9859 them to measure the response time.

Q #26) What is Tidy Parsing?

Answer: Tidy Parsing is a type of parsing that is used in Xpath extractor. If the response is in pure XML then tidy parsing is not required whereas, in the case of XHTML, it is mandatory to check the tidy parsing option in order to fetch the correct results.

Q #27) What are the important plugins that are supported in JMeter?

Answer: JMeter supports different types of plugins which are helpful in generating high-quality results.

Below are the major plugins that are supported:

  • Thread group plugin – Stepping thread group plugin.
  • Samplers plugins like Webdriver.
  • Listeners plugins.

Q #28) What are the types of controllers in JMeter?

Answer: Controllers are used in JMeter to control the flow of execution of requests.

Below are the controllers that are used in JMeter:

  • Recording controller
  • IF controller
  • While controller
  • Transaction controller
  • Loop controller
  • Simple controller
  • Module controller

Conclusion

I’m sure that this article on JMeter interview questions would have helped to enrich your knowledge on JMeter concepts to a great extent.

A thorough understanding of all the questions covered here would help you to crack any interview confidently.

We wish you all the success!!!

Was this helpful?

Thanks for your feedback!

Leave a Comment