Iteanz Interview Questions | Latest Technologies Interview Questions

JMeter Interview Questions and Answers

Written by Bharathkumar | Sep 9, 2022 9:20:12 AM

Q1. What is JMeter tool?
Apache JMeter is open source software, a 100% pure Java desktop application, designed to load test functional behavior and measure performance of web sites. It was originally designed for load testing web applications but has since expanded to other test functions

Q2.What is the meaning of throughput in JMeter?
Throughput is one of the important performance indicator when evaluating the application performance. It signifies number of transactions or requests that can be made in a given period of time. It is a useful measurement to check the load capacity of the server.

Q3. What is latency in Jmeter?
In simple words, Latency is network delay (time taken by network while transferring data) In JMeter latency is time between, when request is sent to server till first byte of response reaches the client/Jmeter. If response time is very low enough then you wont get precise measure of latency.

Q4. Why should we choose JMeter tool for performance testing?
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.

Q5. What is a thread group in JMeter?
A Thread Group is an element of JMeter test plan that represents a pool of virtual users performing a set of operations.

Q6. What is Performance Testing?
Performance testing is a non-functional testing in which application’s performance is evaluated under expected or higher load. It is done before the application is deployed on production to ensure that it doesn’t crashes and responds within standard/acceptable time at real load.

Q7. What are some features of JMeter?
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.

Q8. What kind of applications can be tested using JMeter?
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

Q9. Explain parameterization in JMeter?
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]

Q10. What are the different types of Performance Testing techniques?
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).

Q11. What all activities are performed during performance testing of any application?
Activities performed during performance testing-

  1. Performance Test Requirements Gathering & Analysis – In this phase, all the details about the application are gathered from the client and other stakeholders of the application.
  2. Testing Tool Selection – This phase involves selection of the performance test tools.
  3. Performance Tests Planning – The test planning phase includes strategizing the whole performance testing process, infrastructure and environment setup; use case scenarios to be scripted etc.
  4. Test Script Implementation – In this phase, the performance test scripts are created using the tool selected in the previuos phases.
  5. Performance Test Execution – In this phase, the test script are executed for a predefined time specified during the planning phase.
  6. Test Result Analysis – The result analysis phase includes consolidating the test results for determining the different performance attributes of the application and finding the performance bottlenecks.

Q12. What is correlation?
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]

Q13. What is a Rendezvous Point?
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.

Q14. What are assertions in JMeter? Explain the available assertions in JMeter.
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.

Q15. What is a Test plan?
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.

Q16. What is a Workbench?
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.

Q17. What is ramp up period?
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.

Q18. What are samplers in JMeter?
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.

Q19. What are Listeners in JMeter? State some of the widely used Listeners?
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.

Q20. What is distributed load testing? How can it be achieved in JMeter?
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]

Q21. What are the different timers in JMeter?
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.

Q22. What is the use of Configuration elements?
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.

Q23. What are Pre-Pocessors?
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.

Q24. What are Post-processors?
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.

Q25. How can we reduce the resource requirement in JMeter?
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.