jMeter - Interview Questions

Dear readers, these JMeter Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during  your interview for the subject of JMeter. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer:
A: 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 behavior and measure performance of the application.
It was originally designed for testing Web Applications but has since expanded to other test functions.
A: This test sets the ‘best possible’ performance expectation under a given configuration of infrastructure. It also highlights early in the testing process if changes need to be made before application goes into production.
A: This test is basically used for exercising\discovering the system under the top load it was designed to operate under.
A: This test is an attempt to break the system by overwhelming its resources.
A: The protocols supported by JMeter are:
Web: HTTP, HTTPS sites 'web 1.0' web 2.0 (ajax, flex and flex-ws-amf)
Web: HTTP, HTTPS sites 'web 1.0' web 2.0 (ajax, flex and flex-ws-amf)
Web Services: SOAP / XML-RPC
Web Services: SOAP / XML-RPC
Database via JDBC drivers
Database via JDBC drivers
Directory: LDAP
Directory: LDAP
 Messaging Oriented service via JMS
 Messaging Oriented service via JMS
Service: POP3, IMAP, SMTP
Service: POP3, IMAP, SMTP
FTP Service
FTP Service
A: Following are some of the features of JMeter:
Its free. Its an open source software.
Its free. Its an open source software.
It has simple and intuitive GUI.
It has simple and intuitive GUI.
JMeter can load and performance test many different server types: Web - HTTP, HTTPS, SOAP, Database via JDBC, LDAP, JMS, Mail - POP3
JMeter can load and performance test many different server types: Web - HTTP, HTTPS, SOAP, Database via JDBC, LDAP, JMS, Mail - POP3
It is platform-independent tool. On Linux/Unix, JMeter can be invoked by clicking on JMeter shell script. On Windows it can be invoked by starting the jmeter.bat file.
It is platform-independent tool. On Linux/Unix, JMeter can be invoked by clicking on JMeter shell script. On Windows it can be invoked by starting the jmeter.bat file.
It has full Swing and lightweight component support (precompiled JAR uses packages javax.swing.* ).
It has full Swing and lightweight component support (precompiled JAR uses packages javax.swing.* ).
JMeter store its test plans in XML format. This means you can generate a test plan using a text editor.
JMeter store its test plans in XML format. This means you can generate a test plan using a text editor.
It's full multi-threading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
It's full multi-threading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
It is highly Extensible.
It is highly Extensible.
Can also be used to perform automated and functional testing of your application.
Can also be used to perform automated and functional testing of your application.
A: A Test Plan defines and provides a layout of how and what to test. For example 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.
A: Following is a list of some of the test plan elements: 
ThreadGroup
ThreadGroup
Controllers
Controllers
Listeners
Listeners
Timers
Timers
Assertions
Assertions
Configuration Elements
Configuration Elements
Pre-Processor Elements
Pre-Processor Elements
Post-Processor Elements
Post-Processor Elements
A: Thread Group elements are the beginning points of your test plan. As the name suggests, the thread group elements control the number of threads JMeter will use during the test. 
A: JMeter has two types of Controllers:
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. For example, you can add a HTTP Request sampler if you need to perform a POST, GET, DELETE on a HTTP service 
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. For example, you can add a HTTP Request sampler if you need to perform a POST, GET, DELETE on a HTTP service 
Logical Controllers : Logic Controllers let you control order of processing of Samplers in a Thread. Logic Controllers can change the order of request coming from any of their child elements. Some examples are: ForEach Controller, While Controller, Loop Controller, IF Controller, Run Time Controller, Interleave Controller, Throughput Controller, Run Once Controller. 
Logical Controllers : Logic Controllers let you control order of processing of Samplers in a Thread. Logic Controllers can change the order of request coming from any of their child elements. Some examples are: ForEach Controller, While Controller, Loop Controller, IF Controller, Run Time Controller, Interleave Controller, Throughput Controller, Run Once Controller. 
A: Configuration Elements allow you to create defaults and variables to be used by Samplers. They are used to add or modify requests made by Samplers.
They are executed at the start of the scope of which they are part, before any Samplers that are located in the same scope. Therefore, a Configuration Element is accessed only from inside the branch where it is placed.
A: Listeners let you view the results of Samplers in the form of tables, graphs, trees or simple text in some log files. They provide visual access to the data gathered by JMeter about the test cases as a Sampler component of JMeter is executed.
Listeners can be added anywhere in the test, including directly under the test plan. They will collect data only from elements at or below their level. 
A: A Pre-Procesor 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, or to update variables that are not extracted from response text.
A Post Processor executes after a sampler finishes its execution. This element is most often used to process the response data, for example, to retrieve particular value for later use.
A: Following is the execution order of the test plan elements:

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

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

Using config elements like "CSV Data Set Config", "User Defined Variables", etc for greater data reuse.
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".
Modularizing shared tasks and invoking them via a "Module Controller".
Writing your own BeanShell functions, and reusing them.
Writing your own BeanShell functions, and reusing them.
A: Test plans are usually saved in thr XML format, hence they have nothing to do with any particular OS.  You can run those test plans on any OS where JMeter can run.
A:  Uses of monitor tests are:
Monitors are useful for a stress testing and system management. 
Monitors are useful for a stress testing and system management. 
Used with stress testing, the monitor provides additional information about server performance.
Used with stress testing, the monitor provides additional information about server performance.
Monitors makes it easier to see the relationship between server performance and response time on the client side.
Monitors makes 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.
As a system administration tool, the monitor provides an easy way to monitor multiple servers from one console.
A: 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)}
A: Functions and variables can be written into any field of any test component.
A: Regular expressions are used to search and manipulate text, based on patterns. JMeter interprets forms of regular expressions or patterns being used throughout a JMeter test plan, by including the pattern matching software Apache Jakarta ORO.
A: Below are some suggestion to reduce resource requirements:
Use non-GUI mode: jmeter -n -t test.jmx -l test.jtl.
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.
Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
Disable the “View Result Tree” listener as it consumes a lot of memory and can result in the console freezing or JMeter running out of memory. It is, however, safe to use the “View Result Tree” listener with only “Errors” checked. 
Disable the “View Result Tree” listener as it consumes a lot of memory and can result in the console freezing or JMeter running out of memory. It is, however, safe to use the “View Result Tree” listener with only “Errors” checked. 
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.
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.
Don't use functional mode.
Don't use functional mode.
Use CSV output rather than XML.
Use CSV output rather than XML.
Only save the data that you need.
Only save the data that you need.
Use as few Assertions as possible.
Use as few Assertions as possible.
Disable all JMeter graphs as they consume a lot of memory. You can view all of the real time graphs using the JTLs tab in your web interface.
Disable all JMeter graphs as they consume a lot of memory. You can view all of the real time graphs using the JTLs tab in your web interface.
Do not forget to erase the local path from CSV Data Set Config if used.
Do not forget to erase the local path from CSV Data Set Config if used.
Clean the Files tab prior to every test run.
Clean the Files tab prior to every test run.
Further you can go through your past assignments you have done with the subject and make sure you are able to speak confidently on them. If you are fresher then interviewer does not expect you will answer very complex questions, rather you have to make your basics concepts very strong.
Second it really doesn't matter much if you could not answer few questions but it matters that whatever you answered, you must have answered with confidence. So just feel confident during your interview. We at tutorialspoint wish you best luck to have a good interviewer and all the very best for your future endeavor. Cheers :-)
Copyright © 2014 by tutorialspoint. All Rights Reserved.