JMeter Interview Question

JMeter Interview Questions

Last updated on

Prepare for your JMeter interview with our comprehensive list of JMeter interview questions. These interview questions are designed for both beginners and professionals.

Here, we will cover both theoretical as well as practical interview questions on performance testing and JMeter.

Ques.1. What is Performance Testing?
Ans. Performance testing is a non-functional type of testing in which the 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 crash and responds within standard/acceptable time at real load.

Ques.2. What are the different types of Performance Testing techniques?
Ans. The different types of performance testing are-

Types of Performance Testing
  • Load Testing – Type of performance testing to measure the application behavior under the expected workload.

  • Stress Testing – Evaluating the application’s behavior under load higher than the application’s threshold or peak load conditions.

  • Endurance Testing – Testing application under prolonged load test, usually used to detect memory leaks in the application.

  • Spike Testing – Evaluating the application’s behavior on a sudden increase in the number of users than normal.

  • Volume Testing – Testing the application with a large amount of data, For instance, testing with 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 are-

  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 the selection of the performance test tools.

  3. Performance Tests Planning – The test planning phase includes planning 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 previous phases.

  5. Performance Test Execution – In this phase, the test script is executed for a predefined time specified during the planning phase.

  6. Test Result Analysis – The result analysis phase includes consolidating the test results. Moreover, it helps in determining the different performance attributes of the application and finding the performance bottlenecks.


Ques.4. What is JMeter?
Ans. JMeter is an open-source performance testing tool developed in Java. It can be used for carrying out performance testing of web-based applications, web services(both SOAP and Rest), FTP server, Databases, LDAP server etc.

jmeter tool



Ques.5. Why should we choose the JMeter tool for performance testing?
Ans. The advantages of using the JMeter tool for performance testing are-

  1. It is free to use with zero licensing costs.
  2. It is open-source. In other words, anyone can customize it for their specific use.
  3. There is good online community support and tutorials for JMeter.
  4. It supports performance testing of a wide variety of applications. For example – websites, web services to FTP, and Databases.
  5. It is easy to learn and use.

Ques.6. Explain the internal working of JMeter.
Ans. JMeter simulates real-world user load by creating multiple threads making concurrent requests to a target server. After that, it displays the performance of the server in the form of tables and graphs.

Ques.7. Does JMeter tool simulate a real browser?
Ans. No, JMeter does not simulate or function like a real browser. It cannot render HTML response like an actual browser.

Ques.8. 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 a record and playback feature that ensures the easy and fast creation of test scripts.

  3. JMeter provides different listeners to capture and analyze 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.9. How can we record performance test scripts in JMeter?
Ans. JMeter has HTTP(S) Test Script Recorder using which we can perform operations on a browser and the HTTP requests get recorder in JMeter.

Ques.10. Do we need to learn coding to create scripts in JMeter?
Ans. Script creation in JMeter is somewhat different from normal automated script creation. Mostly, a script can be created by recording or using JMeter UI. Followed by parameterization of tests, correlation, and configuration of different test parameters.
Having said that, coding is required in some scenarios and can be done with Beanshell scripting.

Ques.11. JMeter is Java-based. Can we use it to do performance testing of application implemented in other platforms/languages like .Net?
Ans. Yes, we can test web applications developed in other languages and platforms using JMeter.

Ques.12. 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 – REST and SOAP
  • Databases(JDBC)
  • Shell scripts
  • FTP
  • LDAP
  • TCP
  • SMTP, POP3, IMAP

Ques.13. Explain parameterization in JMeter?
Ans. Parameterization is the process of parameterizing the user input or other test inputs. So as to use different values for different users and loop iterations. For instance, 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 iteration.

[For more details, refer to the post- Parameterization in JMeter]

Ques.14. 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. For 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.15. What is a Test Plan?
Ans. A Test plan in JMeter is a logical container that contains all the test elements which constitute the performance test. Some of the different elements in a test plan are – Thread Group, Samplers, Timers, Assertions, Listeners, etc.

Ques.16. What is 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 the workbench doesn’t get saved after with the test plan’s JMX script.

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

Ques.18 What is a test fragment in JMeter?
Ans. A test fragment is a special type of controller in JMeter whose sole purpose is to provide code reusability capability in the test plan. It is like a Thread Group. But is not executed unless it is referenced by either a Module Controller or an Include_Controller.

Ques.19. What is the ramp-up period?
Ans. At the beginning of the 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, the ramp-up period defines the time period within which all the specified users get in running state.

Ques.20. What are samplers in JMeter?
Ans. Samplers in JMeter 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.21. What are Listeners in JMeter? State some of the widely used Listeners?
Ans. Listeners are used for viewing, saving test results and also help in tabular and graphical analysis of the test results. Some of the widely used Listeners are – Aggregate Report, Aggregate Graph, Graph Results, View Results Tree, etc.

Ques.22. What is a JTL file in JMeter?
Ans. The test results in JMeter is saved in the form of JTL files. JTL is an acronym for JMeter Test Logs.

Ques.23. What are the different timers in JMeter?
Ans. Timers are used for halting the test execution of a thread for a certain predefined time. In addition, 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.24. What is the difference between the Gaussian random timer vs Poisson random timer?
Ans. Both Gaussian and Poisson random timers are used to pause the test execution for a random amount of time but close a specific value. The difference between the two lies in their underlying implementation algorithms to generate the random values.

Ques.25. 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 until the number of active users reaches a certain specified value during the load test.

Ques.26. 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 Sampler’s requests. The commonly used assertions are – response assertion, size assertion, XML assertion, BeanShell assertion, HTML Assertion, XPath assertion, etc.

You can also read our detailed article here.

Ques.27. 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 the external CSV file.

Ques.28. What are Pre-Processors?
Ans. Pre-processors are the 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.29. 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.30. What is the order of execution of JMeter test plan elements?
Ans. The order of execution of the test plan elements is-

  1. Configuration elements.
  2. Pre-Processors.
  3. Timers.
  4. Sampler.
  5. Post-Processors
  6. Assertions
  7. Listeners

Ques.31. How can we run JMeter in non-GUI mode?
Ans. Command to run JMeter in non-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.32. 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, the following practices should be incorporated in the tests-

  • Use the non-GUI mode to run the scripts : jmeter -n -t test.jmx -l test.jtl
  • Use as few Listeners as possible in the test plan.
  • Avoid the use of “View Results Tree” or “View Results in Table” listeners during the load test. Use them only during the scripting phase to debug your scripts.
  • Rather than using lots of similar samplers, use the same sampler in a loop. Also, make use of variables (using CSV Data Set) to vary the samples.
  • Don’t use JMeter’s functional mode during your performance test executions.
  • Use CSV output rather than XML as it is much lighter.
  • Only save the data that you are going to need.
  • Use as few Assertions as possible during the load test.

[ source: JMeter Best Practices by Apache]

Ques.33. What is 90% line in JMeter?
Ans. The aggregate report listener has 90% line as one of the metrics. 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).

Ques.34. 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 the load of a large number of users. The reason for using more than one system for load testing is the limitation of a single system to generate a 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].

Ques.35. Is it possible to run Selenium scripts in JMeter?
Ans. Yes, with the help of the WebDriver Set plugin, we can run Selenium Webdriver scripts in JMeter.


This completes our article on JMeter interview questions. I hope these interview questions will help you with your interviews.

Leave a Comment