Performance Testing Using JMeter (14 Blogs)
AWS Global Infrastructure

Top 30 JMeter Interview Questions You Need to Master in 2024

Last updated on Nov 03,2023 34.1K Views

A Data Science Enthusiast with in-hand skills in programming languages such as... A Data Science Enthusiast with in-hand skills in programming languages such as Java & Python.

If your software takes excessive time to load or stalls while performing, the users will simply switch it off. You need the best testing tool to hold your customers. These JMeter Interview Questions and Answers will help you start your career in software testing. These are collected after consulting with JMeter Training experts.

Apache JMeter Interview Questions

 

Q1. What is JMeter?

Apache JMeter - JMeter interview questions - edureka

 

JMeter is one of the Java tools which is used to perform load testing client/server applications. Apache JMeter is open source software, a 100% pure Java desktop application designed to load test functional behaviour and measure performance of the application.

 

Q2. How does JMeter work?

working of jmeter - jmeter interview questions - edureka

JMeter acts like a group of users sending requests to a target server. It collects response from target server and other statistics which show the performance of the application or server via graphs or tables.

 

Q3. What are Regular Expressions in JMeter?

Regular Expressions are used to search and manipulate text. JMeter is used for interpreting forms of regular expression or patterns being used throughout a JMeter test plan.

 

Q4. What are the Protocols supported by JMeter?

The protocols supported by JMeter are:

  • Web: HTTP, HTTPS sites ‘web 1.0’ web 2.0
  • Web Services: SOAP / XML-RPC
  • Database via JDBC drivers
  • Directory: LDAP
  • Messaging Oriented service via JMS
  • Service: POP3, IMAP, SMTP
  • FTP Service

 

Q5. What is a Test Plan in JMeter?

A Test Plan provides a layout of the web application as well as the client-server application. It can be viewed as a container for running tests. A complete test plan will consist of one or more elements such as thread groups, logic controllers, sample-generating controllers, listeners, timers, assertions, and configuration elements. A test plan must have at least one thread group.

 

Q6. What are Samplers & Thread Groups?

Samplers – Sampler generates one or more sample results. These sample results have many attributes like elapsed time, data size, etc. It allows JMeter to send specific types of requests to the server, through samplers, thread group decides which type of request it need to make. Some of the useful samplers are HTTP request, FTP request, JDBC request etc.

samplers & threadgroups - performance testing interview questions - edurekaThread Groups – JMeter is the beginning part of thread group elements. It is an important element of JMeter, where you can set number of users and time to load all the users given in the thread group.

 

Q7. What are the types of processor in JMeter?

The two types of JMeter are:

jmeter processor - jmeter interview questions - edureka

  • Pre-processor
  • Post processor

 

Q8. What are Pre-processor elements? List some of the elements.

A pre-processor is something that will happen before sampler executes. To configure the sample request prior to its execution or to update variables that are not extracted from response text pre-processor elements are used.

Some of the pre-processor elements include:

  • HTTP URL re-writing modifier
  • HTTP user parameter modifier
  • HTML link parser
  • BeanShell PreProcessor

 

Q9. What is a Timer in JMeter? What are the types of it?

A JMeter thread by default will send requests continuously without any pause. Timers are used to get a pause between the request.

The different types of Timer in JMeter are:

  • Constant Timer – This element delays each request in a Thread Group for the same amount of time.
  • Gaussian Timer – This element is used to delay each user request for a random period of time.
  • Synchronizing Timer – This element is used to release number of threads at given point.
  • Uniform Random Timer – This element is used to delay each request for a random period of time.

 

Q10. What is Test Fragment?

Test fragment is a type of element like Thread Group element. The only difference is test fragment is not implemented unless it is referenced by either a Module controller or an Include controller.

 

Q11. What is Assertion in JMeter? List the types of Assertion.

Assertion helps to verify that your server under test returns the expected results.

The Types of Assertion include:

  • Response Assertion – It facilitates the user by comparing the server response against a string pattern to check that the result is as expected.
  • Duration Assertion – You may need to test the response from the server reaches in user-defined time. If it takes longer than the defined time, server response fails.
  • Size Assertion – It is to test that each response coming from server holds the expected number of bytes. It facilitates the user to specify the size.
  • XML Assertion – It verifies that the response coming from the server holds the data in a correct XML format.
  • HTML Assertion – It is helpful for checking the syntax of the response data.

 

Q12. What is the execution order of Test Elements?

The execution order of Test Elements is in the following sequence:

  • Configuration elements
  • Pre-Processors
  • Timers
  • Sampler
  • Post-Processors (unless SampleResult is null)
  • Assertions (unless SampleResult is null)
  • Listeners (unless SampleResult is null)

 

Q13. What are Configuration Elements?

Configuration Elements help you to create defaults and variables to be used by Samplers. They are also used to add or modify requests made by Samplers. These elements are executed at the start of the scope of which they are part. Therefore, a Configuration Element is accessed only from inside the branch where it is placed.

 

Q14. How to reduce the resource requirement in JMeter?

To reduce the resource requirements in JMeter:

  • Use non-GUI mode.
  • During the load, test doesn’t use “view results tree” or “view results in table” listeners. It is used only during scripting phase.
  • Don’t use functional mode.
  • Do not use similar samplers. Instead, use the same sampler in loop and use variable to vary the sample.

 

Q15. How do you ensure re-usability in your JMeter scripts?

You can ensure re-usability in the following ways:

  • Using config elements like “CSV Data Set Config“, “User Defined Variables“, etc for greater data reuse.
  • Modularizing shared tasks and invoking them via a “Module Controller“.
  • Writing your own BeanShell functions, and reusing them.

 

Q16. How to perform Spike Testing in JMeter?

By synchronizing, timer JMeter spike testing can be achieved. Synchronizing timer, blocks thread until a specific amount of threads has been blocked and then release them all together thus creating large instantaneous load.

 

Q17. Mention some of the JMeter Listeners.

Some of the JMeter Listeners are:

  • Spline Visualizer
  • Aggregate Report
  • View Result Tree
  • View Result in Table
  • Monitor Results
  • Distribution Graph
  • BeanShell Listener
  • Summary Report

 

Q18. How to capture the script of the Authentication Window in JMeter?

Authentication - jmeter interview questions - edurekaYou can capture script by recording in the following manner:

  • First you have to Threadgroup in Testplan and then make HTTPProxyServer in Workbench.
  • Next, set port number in Global Setting box and modify your connection setting in IE as local host in address.
  • Then you can start http proxy server in JMeter and run your application for login.

 

Q19. What are the types of Controllers in JMeter?

The two types of Controllers in JMeter are:

Types of Controllers - jmeter interview questions - edureka

  • Samplers Controllers – Samplers allow JMeter to send specific types of requests to a server. They simulate a user’s request for a page from the target server.
  • Logical Controllers – Logical Controllers let you control order of processing of Samplers in a Thread. It can change the order of request coming from any of their child elements.

 

Q20. What are Pre-processor & Post-processor Elements?

Pre-processor – A Pre-Processor is something that will happen before a sampler executes. They are often used to modify the settings of a Sample Request just before it runs.

Post-processor – A Post-Processor executes after a sampler finishes its execution. This element is most often used to process the response data.

 

Q21. What are the uses of Monitor Test?

Some of the uses of Monitor Test are:

  • Monitors are useful for stress testing and system management.
  • Used with stress testing, the monitor provides additional information about server performance.
  • Monitors make it easier to see the relationship between server performance and response time on the client side.
  • As a system administration tool, the monitor provides an easy way to monitor multiple servers from one console.

 

Q22. What are the benefits provided by JMeter for Performance Testing?

Some of the benefits provided by JMeter for Performance Testing are:

  • It can be used to test performance for both static resources and dynamic resources.
  • JMeter can handle a maximum number of concurrent users then your website can handle.
  • It provides graphical analyses of performance reports.

 

Q23. What is Distributed Load Testing & how to achieve it?

Distributed load testing is the process through which numerous systems can be used for simulating a load of a large number of users. JMeter can do distribute load testing with the help of master-slave configuration.

 

Q24. What are the different ways of Data Parameterization in JMeter?

Data parameterization - jmeter interview questions - edureka

Data Parameterization makes the scripts reusable where the values need not be hardcoded for the same request with different parameters.

 

Q25. What are the differences between JMeter & LoadRunner?

JMeterLoadRunner
  • Open Source Tool
  • Developed by Apache
  • It lacks in UI
  • Less Technically Sound
  • Doesn’t support SAP & Siebel
  • Licensed Software
  • Developed by Mercury
  • UI is very impressive
  • It has more technical capabilities
  • Supports SAP, Siebel & Peoplesoft

 

Q26. What are the important plugins supported in JMeter?

The important plugins supported in JMeter are:

plugins - jmeter interview questions - edureka

  • Thread group Plugin
  • Listeners Plugin
  • Samplers Plugin

 

Q27. Mention the differences between JMeter and SoapUI.

JMeterSoapUI
  • It is used for load and performance testing HTTP, JDBC, JMS, Web Service(SOAP), etc.
  • It supports distributed load testing
  • JMeter Kit and Load Generator plugins are needed for IDE
  • It is specific for web services and has a more user-friendly IDE
  • It does not support distributed load testing
  • For most IDE, it has plugin support

 

Q28. What is Workbench?

Workbench is a storage area for adding some components which can be added to 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.

 

Q29. Is it necessary to call embedded resources explicitly in JMeter?

You can eliminate all embedded resources from being explicitly called. Requests have a checkbox at the bottom named as “retrieve embedded resources.” It would grab all CSS, JPG, etc. It is a brilliant way to find resources and broken link in a web App.

 

Q30. What does “Contains” and “Matches” indicate in the Regular Expression?

In the regular expression, Contains indicates that the regular expression matched at least some part of the target. While Matches means the regular expression matched the whole target. So, ‘alphabet’ is “matched” by ‘al.*t.’

 

With this, we have come to the end of JMeter interview questions article. I Hope these JMeter Interview Questions will help you in your interviews. In case you have attended any interviews in the recent past, do paste those interview questions in the comments section and we’ll answer them. 

Also, check out the Performance Testing Certification Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. This course provides you insights into software behavior during workload. In this course, you will learn how to check the response time and latency of software and test if a software package is efficient for scaling. The course will help you check the strength and analyze the overall performance of an application under different load types. 

Comments
0 Comments

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

Top 30 JMeter Interview Questions You Need to Master in 2024

edureka.co