Top 40+ JMeter Interview Questions And Answers To Prepare
Are you ready to ace your upcoming JMeter job interview? Wouldn’t it be great if you knew exactly what questions a hiring manager would be asking you in your next JMeter Load Testing Interview?
We have covered all the important JMeter Interview Questions and Answers in this post.
We have also covered other topics related to you are as follows. Don’t miss to check out.
- Popular JMeter Alternatives
- Best Performance Testing Tools
- Selenium Interview Questions
- Software Testing Interview Questions
- Java Interview Questions For Selenium Automation Testers
- Python Interview Questions For Selenium Testers
- Why you chose Software Testing As Your Career
- Explain Your Selenium Test Automation Framework
Basic & Advanced JMeter Interview Questions and Answers:
JMeter has become the most popular load and performance testing tool in a very short amount of time.
No matter you are experienced or freshers, we have covered all levels based on the requests we got from our readers. Here we have covered JMeter Interview Questions asked in companies.
#1. What is JMeter?
JMeter is an open-source software application used to conduct performance and load testing client/server applications. With the help of JMeter, you can generate complex reports, which tell you what exactly is wrong or not with your website or web application.
Must Read: JMeter Alternatives
#2. How JMeter works?
It works like a group of users sending requests to a target server. This tool collects responses from the target server and other statistics which show the performance of the application or server via graphs or tables in order to check the performance of an application.
#3. Explain regular expressions used in JMeter?
In Jmeter, regular Expression is used to search and manipulate text. It is used to extract some values dynamically from the responses with an objective to use it in a subsequent request or save it for the purpose of reporting. Regular Expression is used in both Pre-Processors as well as Post Processors.
#4. What does “contains” and “matches” indicate in the regular expression?
Contains in the regular expression means that the regular expression matched at least some part of the target.
While matches in the regular expression mean that the regular expression should match the whole target.
#5. What are Listeners?
Listeners are used to storing the execution results of load testing in the form of tables, graphs, trees, log files or in any other format which can be presented to the stakeholders. These listeners can be adjusted anywhere in the test, including directly under the test plan.
#6. Name some JMeter listeners
Some of the JMeter listeners are as follows
- Spline Visualizer
- Aggregate Report
- Aggregate Graph
- Assertion Results
- View Results Tree
- View Result in Table
- Monitor Results
- Response Time Graph
- Distribution Graph
- BeanShell Listener
- Summary Report
- Backend Listener
- Comparison Assertion Visualizer
- Graph Results
- Mailer Visualizer
- Save responses to a file
- Simple data writer
- JSR223 Listener
#7. What are the various types of processors used in JMeter?
There are two types of processer in JMeter
- Pre-processor
- Post-processor
#8. What are JMeter PreProcessors?
JMeter Pre-processor is used to execute actions before the sampler requests are executed in the test scenario. These are used to configure a timeout between sampler execution or before test data generation, or fetching data from a database based on the needs of performance testing.
#9. Mention some pre-processor elements?
Some of the pre-processor elements include
- Beanshell PreProcessor
- BSF PreProcessor
- HTML Link Parser
- HTTP URL Re-writing Modifier
- JDBC PreProcessor
- JSR223 PreProcessor
- RegEx User Parameters
- Sample Timeout
- User Parameters
#10. What is Post-processor?
JMeter Post-processors are used to perform certain actions after the processing of a sampler request. These are used to get the response or gather data into a variable for later use.
#11. Mention some pre-processor elements?
Some of the postprocessor elements include
- Beanshell PostProcessor
- BSF PostProcessor
- CSS/JQuery Extractor
- Debug PostProcessor
- JDBC PostProcessor
- JSON Path PostProcessor
- JSR223 PostProcessor
- Regular Expression Extractor
- Result Status Action Handler
- XPath Extractor
#12. What types of testing can you perform on JMeter?
Apache JMeter is used to test the performance of static resources (HTML, and JavaScript) and dynamic resources (AJAX, JSP, and Servlets). We can use this tool to perform load testing and stress testing of a web application.
#13. Name the protocols supported by JMeter?
The protocols supported by JMeter are as follows:
- Web Protocol: It supports both HTTP and HTTPS sites. Used to test web applications.
- Web Services: It supports both SOAP and REST. Used to test web services applications.
- Database via JDBC drivers used for testing the database applications.
- Directory: LDAP (Lightweight Directory Access Protocol).
- Mail Service: used for testing of mail servers such as POP3, IMAP, SMTP.
- Message-oriented middleware (MOM) service via JMS.
- File Transfer Protocol provides the support for testing the FTP servers and applications.
- MongoDB (NoSQL).
- Native commands or shell scripts.
- TCP.
#14. What is a Test Plan in JMeter?
A test plan can be viewed as a container for running tests on JMeter. It describes a series of steps JMeter will execute when run the tests like what to test and how to execute them.
#15. List some of the test plan elements in JMeter?
A complete test plan consists of one or more elements such as
- Thread Groups
- Logic controllers
- Sample generating controllers
- Listeners
- Timers
- Assertions
- Configuration elements
#16. What is a Workbench?
JMeter workbench is just a temporary storage location to store test elements that can be added to a test plan. JMeter will not save the components of the workbench unless configured. They have to be saved separately as test fragments.
#17. What is the execution order of Test Elements in the test plan of JMeter?
The test plans elements execution order is as follows:
- Configuration elements
- Pre-processors
- Timers
- Samplers
- Post-processors (unless SampleResult is null)
- Assertions (unless SampleResult is null)
- Listeners (unless SampleResult is null)
#18. What is a Timer in JMeter?
JMeter thread naturally sends requests without applying any delay between each sampler/
#19. What are the types of Timer in JMeter?
The various sorts of Timer in JMeter are:
- Constant Timer
- Gaussian Random Timer
- Synchronizing Timer
- Uniform Random Timer
- Poisson Random Timer
- Beanshell Timer
- BSF Timer
- Constant Throughput Timer
- JSR223 Timer
#20. What are Samples in JMeter?
It generates one or more sample results. These sample results have various features like data size, elapsed time, etc. JMeter sends specific types of requests to the server; with the help of samplers, the thread group decides which request is required to make. Some of the common samplers used are HTTP request, JDBC request, FTP request, etc.,
#21. What are Thread Groups in JMeter?
Thread groups are an important element of JMeter. Here, you can set the number of users and time to load all the users given in the thread group. A test plan must have at least one thread group. The controls for a thread group allow you to set the number of threads, ramp-up period, and a number of times to execute the test.
#22. What is a Test Fragment in JMeter?
It is a sort of element like Thread Group that helps to set up the module-based approach while creating the script of a large flow. The single distinction is that the test fragment isn’t executed except if it is referred to by either a Module controller or an Include controller.
#23. What is the Module controller in JMeter?
The Module Controller in JMeter allows you to switch between the controller (contains child elements) of the test plan. These controllers can either be placed in Thread Group or in Workbench.
#24. What is the Include controller in JMeter?
The Include controller is designed to use an external JMX file. The Include Controller in JMeter allows you to use multiple test plans.
#25. What are functions and variables in JMeter?
JMeter functions are special values that can populate fields of any Sampler or other element in a test tree.
A function call looks like this:
${__functionName(var1,var2,var3)}
JMeter provides user-defined static values (or variables), and built-in functions to perform different actions.
Functions and variables can be written into any field of any test component in order to make the script reusable.
Syntax of Variable:
${VARIABLE}
#26. What JMeter does if an undefined function or variable is referenced?
If an undefined function or variable is referenced, JMeter does not report/log an error – the reference is returned unchanged. For example if STM is not defined as a variable, then the value of ${STM} is ${STM}.
#27. What is Assertion in JMeter? What are the types of assertion?
Assertion assists with confirming that your server under test returns the expected results.
Some commonly used Assertion in JMeter are as follows.
- Response Assertion: It facilitates the users by comparing the server response against a string pattern to verify that the result is as expected or not.
- Size Assertion: It tests every response coming from the server holds the expected number of bytes. It helps the user to determine the size i.e., equal to, not equal to, greater than, or less than a given number of bytes.
- Duration Assertion: You may have to test the response from the server reaches in user-defined time. Server response becomes fail, if it takes longer than the user-defined time.
- XML Assertion: It checks that the response coming from the server holds the data in the right XML format.
- HTML Assertion: It is useful to verify the syntax of the response data.
#28. How would you ensure re-usability in your JMeter scripts?
By following the below points we can guarantee re-usability in the test scripts:
- Utilizing config elements like “CSV data set Config”, “User-Defined Variables”, and so forth for supporting greater data reuse.
- Modularizing shared tasks and invoking them through a “Module Controller”.
- Creating your own BeanShell functions, and reuse them.
#29. What are the types of Controllers in JMeter?
The two kinds of Controllers in JMeter are:
Samplers Controllers: Samplers enable JMeter to send certain kinds of requests to a server. They stimulate a user’s requests for a page from the target server.
Logical Controllers: These controllers let you control the order of processing of Samplers in a Thread. It can change the order of requests coming from any of their child elements.
#30. What is Spike Testing in JMeter?
Suddenly increasing the number of users at a certain point of application and afterward checking its behavior at that interval is Spike testing.
#31. How to perform Spike Testing in JMeter?
In JMeter, Spike testing can be performed utilizing Synchronizing Timer. This timer continues obstructing the threads until a specific number of threads get reserved. It releases them at the same time hence making a large instantaneous load.
#32. What are the uses of Monitor Test?
Some of the uses of Monitor Test are:
- It is useful for system management and stress testing.
- It also gives additional information about server performance when used with stress testing.
- Monitors make it easy to see the connection between server performance and response time on the client-side.
- As a system administration tool, it also provides a simple method to monitor multiple servers from one console.
#33. What are the important plugins supported in JMeter?
JMeter supports different types of plugins that help in generating high-quality results. Some of the important plugins supported in JMeter are as follows.
- Thread group Plugin
- Listeners Plugin
- Samplers Plugin
#34. What is Data Parameterization and what are the different ways of Data Parameterization in JMeter?
Data Parameterization allows us to reusable the scripts. We can pass different parameters for the same request without hardcoding the values in the script.
It can be done using the CSV Data Set Config file or User Defined Variables.
#35. What are the differences between JMeter and LoadRunner?
JMeter | LoadRunner |
---|---|
Open source tool | Licensed software |
It is developed by Apache | It is developed by Mercury |
It lacks in User Interface | Its UI is very impressive |
Less technical sound when compared to LoadRunner | It has more technical capabilities |
It doesn't support SAP & Siebel | It supports SAP, Siebel & PeopleSoft |
#36. Can we integrate selenium with JMeter?
Apache JMeter and Selenium can be integrated by adding the WebDriver sampler plugin in the JMeter ext folder and then restart the Jmeter. We can then write the selenium code in the Webdriver sampler and then execute it to see the performance.
#37. What are the differences between JMeter and Selenium?
JMeter | Selenium |
---|---|
JMeter is a open-source tool that supports performance testing | Selenium is a open source tool that mainly supports web browser integration testing |
It doesn’t extend support to cross browser testing | It supports wide range of browsers for cross browser testing |
It is suitable for performance and stress testing of applications | It is suitable for more complex testing such as production monitoring and load testing |
Browser is not required to run JMeter | Browser is required to run Selenium |
It supports distributed testing. | To support distributed testing we need to use an extension ie., Selenium Grid. |
#38. What is Distributed Load Testing?
Distributed load testing is the process of simulating huge workload of a large number of users using multiple systems. Multiple systems are used for distributed load testing because a single system cannot generate a large number of users (threads). Master-Slave configuration is used for achieving load testing in JMeter.
#39. How would you do master-slave configuration in JMeter?
Master-slave configuration is considered as a part of Distributed Testing in which more than one machine is used to perform load testing of the server under test. All the machines should be in the same network and have same JMeter version installed. The configuration is done such a way that one machine as Master and others as Slaves.
Steps to perform Master-Slave configuration in JMeter are as follows.
- Master Machine – Edit the jmeter.properties file and add the IP addresses of all the slave machines against the remote_host field in the file.
- Save the file and launch the JMeter again.
- 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.
#40. How can you reduce resource requirements in JMeter?
Following are some suggestion to reduce resource requirements in JMeter:
- Utilize non-GUI mode.
- Use as few Listeners as possible
- Disables listeners such as “View Results Tree” or “View Results in Table”. It consumes a lot of memory and leads to JMeter running out of memory or console freezing.
- Try not to utilize functional mode.
- Instead of 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.
- Use CSV output rather than XML.
- Try to use as few Assertions as possible.
- Store the data only which is necessary.
- Disable all JMeter graphs as they consume a lot of memory. Still, you can view the real time graphs using the JTL tab in the web interface.
- Clear the files tab before every test run.
- Try to erase the local path from CSV Data Set Config when used. Access Log Sampler.
Conclusion:
I hope that this article on JMeter Interview Questions will help you understand the concept better and makes you crack any interview without any hitch. I hope we have covered the most frequently asked JMeter Interview Questions here. In case you have any other questions which we didn’t cover here, please ask them in the comments section and we will answer them.
Related posts:
- Best Performance Testing Tools
- Selenium Interview Questions
- Software Testing Interview Questions
- Java Interview Questions For Selenium Automation Testers
- Python Interview Questions For Selenium Testers
- Why you chose Software Testing As Your Career
- Explain Your Selenium Test Automation Framework