Nothing Special   »   [go: up one dir, main page]

#1. What Is Jmeter?: Must Read

Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

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/request. Timers are utilized to get a pause between the requests.
If we perform load testing or stress testing on a server without any delay, it will
create a server overload problem. Timer in JMeter solves the server overload
issues.

#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 Selenium is a open source tool that mainly supports web
testing 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 It is suitable for more complex testing such as production
applications monitoring and load testing

Browser is not required to run JMeter Browser is required to run Selenium

To support distributed testing we need to use an extension


It supports distributed testing.
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.

1. 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.
2. Save the file and launch the JMeter again.
3. From the RUN menu in JMeter, select Remote Start and choose the IP of
the machine to be invoked.
4. 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.

What is a Thread Group in JMeter?


The Thread Group is a fundamental element in JMeter that represents a
group of virtual users or threads that will simulate concurrent users in a
performance test.
Q.2How do you configure the number of threads in a Thread Group?
In the Thread Group, you can set the number of threads by specifying the
desired "Number of Threads (users)" parameter. This determines how
many virtual users will be simulated during the test.
Q.3What is the purpose of the Ramp-Up Period in a Thread Group?
The Ramp-Up Period in a Thread Group defines the time it takes for JMeter
to start all the threads specified. For example, if you have 100 threads and
a ramp-up period of 10 seconds, JMeter will start 10 threads every second
for 10 seconds.
Q.4Explain the meaning of the Loop Count in a Thread Group.
The Loop Count determines the number of times each thread will execute
the test plan within the Thread Group. For instance, if the Loop Count is set
to 5, each thread will repeat the test plan 5 times before completing.
Q.5How can you configure a Thread Group to simulate different user
behaviors?
JMeter provides several controllers, such as the Random Controller or
Throughput Controller, which can be used within the Thread Group to
simulate different user behaviors. By placing different samplers under
these controllers, you can vary the requests made by virtual users.
Q.6What is the significance of the Scheduler checkbox in a Thread Group?
Enabling the Scheduler checkbox allows you to specify the duration of the
test. With the Scheduler enabled, you can set the test to run for a specific
duration, defined by the Start Time, End Time, and Duration parameters.
Q.7How does the Duration Assertion in a Thread Group work?
The Duration Assertion in a Thread Group checks if the response time of
the requests falls within a specified range. If any response exceeds the
defined duration, the assertion will fail, and it can be used to validate the
performance of the application under load.
Q.8Can you explain the Purpose and Use of the Stepping Thread Group?
The Stepping Thread Group is a plugin in JMeter that allows you to
configure a gradual ramp-up of threads. It is useful for gradually increasing
the load on the server, which can help identify performance bottlenecks
more effectively.
Q.9How do you set a specific delay between thread iterations in a Thread
Group?
You can use the Constant Timer or the Uniform Random Timer within the
Thread Group to set a delay between iterations of each thread. These
timers add a pause between consecutive requests made by a thread.
Q.10What is the purpose of the Action to be taken after a Sampler error in
a Thread Group?
The "Action to be taken after a Sampler error" option in the Thread Group
determines the behavior of JMeter when a sampler (e.g., an HTTP request)
encounters an error. You can choose to either continue with the test or
stop the test entirely after encountering an error.
Q.11What is a Controller in JMeter?
A Controller in JMeter is an element that helps organize and structure the
test plan. It provides logic for managing the flow of requests and controls
the behavior of virtual users.
Q.12What are the different types of Controllers available in JMeter?
JMeter provides various types of Controllers, including Simple Controller,
Loop Controller, If Controller, While Controller, Switch Controller,
Throughput Controller, and Random Controller, among others.
Q.13Explain the purpose of the Loop Controller in JMeter.
The Loop Controller allows you to repeat a set of samplers or other
controllers a specified number of times. It is useful for creating loops and
executing specific test scenarios repeatedly.
Q.14What is the functionality of the If Controller in JMeter?
The If Controller allows you to include or exclude certain samplers or
controllers based on a condition. It evaluates the condition and executes
the child elements if the condition is true; otherwise, it skips them.
Q.15How does the Throughput Controller work in JMeter?
The Throughput Controller allows you to control the number of times a
sampler or controller is executed based on a percentage or hit rate. It helps
maintain a desired throughput by adjusting the frequency of requests.
Q.16What is the purpose of the Switch Controller in JMeter?
The Switch Controller acts as a switch statement, allowing you to define
multiple paths or scenarios based on different conditions. It evaluates a
variable or function and executes the corresponding child element based
on the evaluated value.
Q.17How does the Random Controller function in JMeter?
The Random Controller allows you to execute child elements randomly.
Each child element is assigned a weight, and the controller selects
elements based on their weights, resulting in random execution order.
Q.18Explain the functionality of the Interleave Controller in JMeter.
The Interleave Controller cycles through its child elements sequentially,
executing one iteration of each child element before moving on to the next
iteration. It is useful for alternating between different requests or
scenarios.
Q.19How can you use the Throughput Shaping Timer with Controllers in
JMeter?
The Throughput Shaping Timer can be used with Controllers to control the
desired throughput of requests. By configuring the desired number of
requests per minute or second, you can ensure a specific load on the
system.
Q.20What is the purpose of the Simple Controller in JMeter?
The Simple Controller is a basic container that allows you to group
samplers or other controllers together. It is used for organizing and
structuring the test plan, providing a logical grouping of related elements.
Q.21What are Listeners in JMeter?
Listeners in JMeter are components that collect and display test results.
They provide real-time information and analysis of the performance test,
including response times, error rates, throughput, and other metrics.
Q.22Name some commonly used Listeners in JMeter.
JMeter provides several Listeners, such as View Results Tree, Aggregate
Report, Summary Report, Graph Results, Table Listener, and Backend
Listener.
Q.23What is the purpose of the View Results Tree Listener?
The View Results Tree Listener displays the detailed results of each
sample, including request and response data. It is useful for debugging and
analyzing individual requests but can consume significant memory and
impact performance.
Q.24How does the Aggregate Report Listener help in performance
analysis?
The Aggregate Report Listener summarizes the test results in a tabular
format, providing information on average response time, throughput, error
count, and more. It helps in analyzing overall performance and identifying
bottlenecks.
Q.25Explain the functionality of the Summary Report Listener.
The Summary Report Listener provides a summary of test results, including
statistics like average response time, minimum and maximum response
times, and throughput. It gives a high-level overview of the test
performance.
Q.26What is the purpose of the Graph Results Listener in JMeter?
The Graph Results Listener visualizes test results in the form of graphs,
allowing you to analyze performance trends over time. It helps in
identifying patterns, spikes, and anomalies in response times or
throughput.
Q.27How can you use the Table Listener in JMeter?
The Table Listener displays the test results in a tabular format, similar to a
spreadsheet. It provides a detailed view of the data, allowing you to sort
and filter the results based on various columns.
Q.28Explain the functionality of the Backend Listener in JMeter.
The Backend Listener sends test results to external systems, such as
databases or monitoring tools, for real-time analysis. It allows you to
integrate JMeter with external reporting or analysis systems.
Q.29How does the Assertion Results Listener help in identifying test
failures?
The Assertion Results Listener displays the results of assertions performed
during the test. It shows which assertions passed or failed, helping in
identifying errors or inconsistencies in the response data.
Q.30What is the purpose of the Response Time Graph Listener in JMeter?
The Response Time Graph Listener visualizes the response times of each
request over time, providing a graphical representation. It helps in
monitoring the response time trends and identifying performance issues.
Q.31What are Timers in JMeter?
Timers in JMeter are elements that introduce delays between requests or
control the pace of test execution. They simulate realistic user behavior by
adding pauses or think times during test scenarios.
Q.32How do you add a Timer to a test plan in JMeter?
To add a Timer, you can right-click on a sampler or controller and navigate
to "Add" -> "Timer." Then, select the desired Timer element from the list.
Q.33Explain the purpose of the Constant Timer in JMeter.
The Constant Timer in JMeter adds a fixed delay between consecutive
requests made by a thread. It is useful for simulating a specific delay or
think time between user actions.
Q.34How does the Uniform Random Timer work in JMeter?
The Uniform Random Timer introduces a random delay between requests
within a specified range. Each thread will have a different delay, adding
variability to the test scenario and mimicking user behavior.
Q.35What is the functionality of the Gaussian Random Timer in JMeter?
The Gaussian Random Timer adds a random delay between requests,
following a Gaussian distribution. It allows you to create more realistic
scenarios by simulating variable think times similar to real user behavior.
Q.36How can you use the Constant Throughput Timer in JMeter?
The Constant Throughput Timer allows you to control the number of
requests per minute or second, maintaining a constant throughput rate. It
helps in load testing scenarios where you want to limit the request rate.
Q.37Explain the architecture of Jmeter.
Jmeter is an open source application which is Java based, designed for the
purpose of Load Testing.

Jmeter supports all major protocols which are supported in Load Runner.
But unlike any browser, Jmeter works on different levels of protocols and
does not execute JavaScript present in HTML web pages.

Q.38Explain the purpose of the Synchronizing Timer in JMeter.


The Synchronizing Timer in JMeter allows multiple threads to pause and
synchronize at a specific point, creating a moment of simultaneous
execution. It is useful for simulating concurrent user behavior.
Q.39How can Jmeter simulate actual browser behavior?
Jmeter does not support the actual browser behavior as it does not render
the HTML webpages as the normal browser.

Such that response can be seen in HTML format but the actual timings are
not there in the generated samples.

Q.40How does the BeanShell Timer function in JMeter?


The BeanShell Timer allows you to execute custom logic using BeanShell
scripting language. You can add custom delays or create complex timing
scenarios based on your specific requirements.
Q.41What is the use of Regular Expression in Jmeter?
Regular Expression in Jmeter is used for extracting some values
dynamically from the responses with an objective to use to it in the
subsequent request or save it for reporting purposes.

Regular Expression is used in both Pre-Processors as well as Post


Processors.

Q.42What is the purpose of the Poisson Random Timer in JMeter?


The Poisson Random Timer adds delays between requests, following a
Poisson distribution. It is useful for simulating realistic arrival patterns and
creating more accurate load scenarios.
Q.43What are the different methods used in Data Parametrization in
Jmeter?
The objective of data parametrization is to make the scripts reusable where
the values need not be hardcoded for the same request with different
parameters.

The data parametrization that is supported in JMeter are -

1. CSV Data Set Config

2. User Defined Variables

Q.44How can you configure a Timer to apply only to specific samplers in


JMeter?
By placing the Timer as a child element of the specific sampler or
controller, you can ensure that the Timer only applies to those particular
elements. This allows you to control timing on a per-request basis.
Q.45How many maximum threads are recommended on a single system?
The recommendation of maximum threads on a single system is based on
the hardware configuration of the system which includes a processor, JVM,
allocated memory -Xmx, etc.

There are other factors as well that impact this such as the number of
components in the test plan like the number of config elements or
processors and it also depends on whether you are using GUI/Non-GUI
Mode.

Q.46What are Assertions in JMeter?


Assertions in JMeter are elements used to validate the response received
from the server during performance testing. They enable testers to verify if
the server response meets the expected criteria or contains specific
patterns or values.
Q.47What is the difference between Gaussian and Poisson Timers?
Since both Gaussian and Poisson Timers work on a mathematical formula
that has some constant delay and additional offset.
The point of difference between the Gaussian and Poisson Timers is
because of in the fact that the lambda value is calculated in case of
Poisson timer and deviation is calculated in case of Gaussian Timer.

Q.48How do you add an Assertion to a test plan in JMeter?


To add an Assertion, you can right-click on a sampler or controller in the
test plan and navigate to "Add" -> "Assertions." Then, select the desired
Assertion element from the list.
Q.49What is the primary use of co-relation in Jmeter?
Co-relation is basically a process in which the values can be extracted from
the server response and stored in a variable which is then then used in any
other request which is to follow.

For instance in order to test any login functionality if you have to use
session ID/cookie ID , you can then extract the value from the response of
GET request of the login page and then dynamically use the same while
making POST request for login.

Q.50Explain the purpose of the Response Assertion in JMeter.


The Response Assertion allows you to validate different aspects of the
server response, such as the presence or absence of specific text,
response code, response time, or pattern matching using regular
expressions.
Q.51What is the purpose of listeners?
Listeners are majorly used for storing the execution results of load testing
in different forms like table, graph, tree or in any other presentable format
which can be presented to the client.

There are different type of inbuilt listeners in Jmeter and many others can
be imported into it by using plugins as per the requirement.

There are some inbuilt listeners like View Results in Table, View Results
Tree, Graph Results, Aggregate Graph, Aggregate Report, Assertion Results
and Response Time Graph.

Q.52What is the functionality of the Duration Assertion in JMeter?


The Duration Assertion checks if the response time of a sampler falls
within a specified range. It helps in ensuring that the server responds within
an acceptable timeframe, and can be used to identify performance issues.
Q.53What will be flow of Test Script Recorder?
The Test Script Recorder is majorly used to record all the http(s) request
which is going to the server from the application. Such that there are some
other configurations that are required to be done in Jmeter in order to
make it functional.

We should follow the following steps to record https traffic

1. Firstly add HTTP(s) Test Script Recorder to WorkBench.

2. Then enter the port number which you want to start your proxy server
from.

3. Thirdly select the Target either as “Workbench” only or add a Recording


Controller in the test plan and select the same as Target so that all the
recordings are stored under it.

4. Next start the Proxy Server.

5. Lastly configure the browser with manual proxy settings pointing to the
same port number used in the test script recorder.

Q.54How does the Size Assertion work in JMeter?


The Size Assertion validates the size of the response received from the
server, including the number of bytes or characters. It helps in verifying if
the response size is as expected, indicating the correctness of the server
response.
Q.55How can Jmeter record actions from Mobile?
Jmeter can record HTTP or https request going to the server from your
mobile application also. Therefore Mobile and Jmeter should be on the
same network.

The configuration required to record actions from Mobile,

1. First configure the proxy server in JMeter to run at a specified port.

2. Second set up a proxy on the mobile wifi settings and then enter the
same port number that is used in the recorder.

3. Third install the Root CA certificate on the mobile.

4. Fourth hit server request from the mobile and observe it getting captured
by the specified controller.
Q.56What is the purpose of the XML Assertion in JMeter?
The XML Assertion validates if the response received from the server is
well-formed XML and conforms to a specific XML schema or structure. It
ensures that the server is returning valid XML responses.
Q.57How would you do master-slave configuration in Jmeter?
Master-Slave configuration is considered as a part of Distributed Testing in
which case more than one machine is used to perform load testing of the
server under test. Such that it becomes important that all machines are on
the same network and all have the same version of Jmeter. Also in
distributed testing, one machine is made as the Master and the others are
kept as slaves by doing some configurations.

Steps to perform master-slave configuration are -

1. Edit the jmeter.properties file on the master machine, and add the IP
addresses of slave machines against the remote_host field in the file.

2. Next save the file and open the Jmeter again.

3. Now from the RUN menu in Jmeter, select Remote Start and choose the
IP of the machine to be invoked.

4. Choose RUN menu and select Remote Start all to start all the slave
machines for testing.

Q.58Explain the functionality of the JSON Assertion in JMeter.


The JSON Assertion validates if the response received from the server is
well-formed JSON and conforms to a specific JSON schema or structure. It
helps in verifying the correctness of JSON responses.
Q.59Would you recommend to run Jmeter in GUI Mode?
Indeed, Jmeter tests can be run both GUI as well as Non-GUI Mode.

But it is recommended to run the load test in Non-GUI mode since AWT
Event Thread can kill the tests in case of high load scenarios.

Some of the Non-GUI mode supported with Jmeter such as - Command


Line, ANT Plugin, MAVEN Plugin, and Jenkins.

Q.60How can you use the BeanShell Assertion in JMeter?


The BeanShell Assertion allows you to execute custom logic using
BeanShell scripting language. You can define custom validation criteria
based on your specific requirements, making it a versatile assertion
element.
Q.61Can to run Selenium scripts in Jmeter?
We can run selenium scripts in Jmeter to get some ideas on their
performance.

This can be done by either using Junit libraries to build Selenium scripts
and save as Jars and copy the same in Jmeter directory. Else add Junit
sampler to the test plan and import the Jar file.

Otherwise, we can add 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 to see the performance.

Q.62What is the purpose of the Compare Assertion in JMeter?


The Compare Assertion compares two server responses to check if they
are identical or have specific differences. It helps in validating if the server
responses are consistent across different test runs.
Q.63How can we manage session and cookies in Jmeter?
We can manage the sessions and cookies in Jmeter by using config
elements like HTTP Cache Manager which provides an option to clear the
cookies in every iteration and also allows to add user-defined cookies.

The HTTP Cache manager primarily helps you in clearing cache after each
iteration as per your requirement in the load tests and thereby limit the
number of elements that can be stored in the cache. In which case both the
config elements can be attached to the HTTP sampler.

Q.64How can you configure an Assertion to ignore certain parts of the


response in JMeter?
By using the "Not" operator or regular expressions, you can configure an
Assertion to ignore specific parts of the response. This allows you to focus
on validating specific areas while excluding irrelevant data from the
validation process.
Q.65Let us suppose I have multiple screens in my mobile app. Then can
Jmeter measure the time taken to flip the screens or can Jmeter measure
the performance of a complete application?
At no point of time Jmeter measure the transition time between the
screens. As it can only measure the server actions not the UI interactions.
Q.66What are Configuration Elements in JMeter?
Configuration Elements in JMeter are components that define and modify
the behavior of samplers and other elements in the test plan. They allow
you to set up variables, headers, cookies, and other configurations required
for the test execution.
Q.67What is the use of Workbench?
Workbench is primarily used as a storage area for adding components that
can be added to test plan as and when required.

Such that the components of workbench does not get saved with the test
plan automatically. They have to be saved separately as test fragments.

Workbench is known for HTTP(s) Test script recorder which is extremely


useful in recording the https request and later load can be applied on them
to measure the response time.

Q.68How do you add a Configuration Element to a test plan in JMeter?


To add a Configuration Element, you can right-click on a sampler or
controller in the test plan and navigate to "Add" -> "Config Element." Then,
select the desired Configuration Element from the list.
Q.69Explain the purpose of the HTTP Cookie Manager in JMeter.
The HTTP Cookie Manager manages cookies during HTTP requests. It
automatically stores and sends cookies, allowing the test to maintain
session state and handle cookie-based authentication.
Q.70What is the functionality of the CSV Data Set Config in JMeter?
The CSV Data Set Config reads data from a CSV file and provides the
values to samplers during the test execution. It is useful for parameterizing
test scenarios and using different data sets for each iteration.
Q.71How does the User Defined Variables Configuration Element work in
JMeter?
The User Defined Variables Configuration Element allows you to define
custom variables with specific values. These variables can be referenced in
other elements, enabling dynamic parameterization and data manipulation.
Q.72What is the purpose of the HTTP Header Manager in JMeter?
The HTTP Header Manager allows you to add or modify HTTP request
headers sent by samplers. It helps in simulating different user agents,
authorization headers, or other custom headers required for testing.
Q.73Explain the functionality of the Counter Config Element in JMeter.
The Counter Config Element generates a unique incrementing or
decrementing value for each iteration of a thread. It is useful for creating
dynamic variables or generating unique identifiers during test execution.
Q.74What is the purpose of the JDBC Connection Configuration in
JMeter?
The JDBC Connection Configuration allows you to configure a database
connection for JDBC samplers. It provides the necessary parameters, such
as the database URL, username, and password, for establishing a
connection to the database.
Q.75How can you use the DNS Cache Manager in JMeter?
The DNS Cache Manager resolves DNS names to IP addresses and caches
them for subsequent requests. It helps in reducing the DNS lookup time
and improving the performance of the test plan.
Q.76What is the functionality of the FTP Request Defaults Configuration
Element in JMeter?
The FTP Request Defaults Configuration Element allows you to set default
values for FTP requests, such as the server name, port, username, and
password. It avoids repetitive configuration for multiple FTP samplers in
the test plan.
Q.77What are Pre-Processor Elements in JMeter?
Pre-Processor Elements in JMeter are components that are executed
before each sampler in a test plan. They enable you to modify or
manipulate the requests or variables before they are sent to the server.
Q.78How do you add a Pre-Processor Element to a test plan in JMeter?
To add a Pre-Processor Element, you can right-click on a sampler or
controller in the test plan and navigate to "Add" -> "Pre Processors." Then,
select the desired Pre-Processor element from the list.
Q.79Explain the purpose of the HTTP URL Re-writing Modifier in JMeter.
The HTTP URL Re-writing Modifier modifies the URLs in the HTTP requests,
allowing you to dynamically change or manipulate them before they are
sent to the server. It helps in handling session IDs or dynamic parameters.
Q.80What is the functionality of the User Parameters Pre-Processor in
JMeter?
The User Parameters Pre-Processor allows you to define user-specific
parameters or variables that are specific to each thread. It helps in
simulating individual user behavior by passing unique values to each
thread.
Q.81How does the BeanShell Pre-Processor work in JMeter?
The BeanShell Pre-Processor executes custom logic using BeanShell
scripting language before each sampler. It enables you to manipulate
variables, perform calculations, or modify requests based on specific
conditions.
Q.82What is the purpose of the JSR223 Pre-Processor in JMeter?
The JSR223 Pre-Processor executes custom logic using scripting
languages such as Groovy, JavaScript, or Python. It provides flexibility in
modifying requests or variables before they are sent to the server.
Q.83Explain the functionality of the HTML Link Parser Pre-Processor in
JMeter.
The HTML Link Parser Pre-Processor extracts links from an HTML
response and saves them as JMeter variables. It helps in creating dynamic
scenarios by dynamically extracting and using links from a web page.
Q.84What is the purpose of the Regular Expression Extractor in JMeter?
The Regular Expression Extractor extracts data from a server response
using regular expressions. It allows you to capture specific values or
patterns from the response and save them as variables for subsequent
requests.
Q.85How can you use the CSV Data Set Config with Pre-Processor
Elements in JMeter?
By placing the CSV Data Set Config as a child of a Pre-Processor Element,
you can use it to provide dynamic data for each thread. It enables you to
parameterize requests or customize behavior based on the data read from
the CSV file.
Q.86What is the functionality of the Random Variable Pre-Processor in
JMeter?
The Random Variable Pre-Processor generates random values and saves
them as variables. It helps in simulating user behavior that requires random
input or generating unique values during the test execution.
Q.87What are Post-Processor Elements in JMeter?
Post-Processor Elements in JMeter are components that are executed
after each sampler in a test plan. They allow you to extract or process data
from the server response and perform actions based on that data.
Q.88How do you add a Post-Processor Element to a test plan in JMeter?
To add a Post-Processor Element, you can right-click on a sampler or
controller in the test plan and navigate to "Add" -> "Post Processors." Then,
select the desired Post-Processor element from the list.
Q.89Explain the purpose of the Regular Expression Extractor in JMeter.
The Regular Expression Extractor is a commonly used Post-Processor that
extracts data from a server response using regular expressions. It allows
you to capture specific values or patterns from the response and save
them as variables for further use.
Q.90What is the functionality of the CSS Selector Extractor in JMeter?
The CSS Selector Extractor extracts data from an HTML response using
CSS selectors. It provides an easy and efficient way to extract specific
elements or data from the HTML response and save them as variables.
Q.91How does the XPath Extractor work in JMeter?
The XPath Extractor extracts data from an XML or HTML response using
XPath expressions. It enables you to navigate and select specific elements
or values from the XML/HTML structure and save them as variables.
Q.92What is the purpose of the JSON Extractor in JMeter?
The JSON Extractor extracts data from a JSON response using JSONPath
expressions. It allows you to parse and retrieve specific data points from
the JSON structure and save them as variables for further processing.
Q.93Explain the functionality of the Boundary Extractor in JMeter.
The Boundary Extractor extracts data from a response by specifying the
left and right boundaries of the desired data. It helps in extracting specific
portions of text from the response and saving them as variables.
Q.94What is the purpose of the BeanShell Post-Processor in JMeter?
The BeanShell Post-Processor executes custom logic using BeanShell
scripting language after each sampler. It enables you to manipulate
variables, perform calculations, or extract specific data from the response
based on your requirements.
Q.95How can you use the Debug Post-Processor in JMeter?
The Debug Post-Processor is used for debugging purposes. It adds the
response data, request headers, and other relevant information to the
JMeter debug log or output. It helps in troubleshooting and analyzing the
test results.
Q.96What is the functionality of the Result Status Action Handler in
JMeter?
The Result Status Action Handler allows you to define actions based on the
result status of the previous sampler. You can configure it to perform
specific actions, such as branching to different samplers or logging
messages, based on the result status (success, failure, error) of the
previous request.
Q.97What is the Execution Order in JMeter?
The Execution Order in JMeter refers to the sequence in which different
elements are executed within a test plan. It determines how the requests,
timers, assertions, and other components are processed during the test
execution.
Q.98Which element is executed first in JMeter?
The Thread Group is the first element that is executed in JMeter. It sets the
initial configuration and controls the number of threads, ramp-up period,
and loop count for the test plan.
Q.99What is the role of Controllers in the Execution Order?
Controllers in JMeter determine the flow and logic of the test execution.
They decide which samplers, timers, and other elements are executed and
in what order. Controllers can be used to define loops, conditions, and
branching within the test plan.
Q.100How are Samplers executed within a Thread Group?
Samplers within a Thread Group are executed sequentially based on the
order in which they are placed. Each thread in the Thread Group executes
the samplers one by one, following the logic defined by the controllers.
Q.101Which programming language does JMeter is based on?
Jmeter is based on Java programming language and not on other
programming languages.
Q.102When are Timers executed in JMeter?
Timers in JMeter are executed before each sampler within a Thread Group.
They introduce delays or think times between requests, ensuring that the
test scenario simulates realistic user behavior.
Q.103Which XML parser is present in Jmeter?
JMeter comes with Apache's Xerces XML parser and not with other listed
options.
Q.104What is the order of execution for Assertions in JMeter?
Assertions in JMeter are executed after each sampler. They validate the
server response and check if it meets the specified criteria. Assertions help
in verifying the correctness of the response received from the server.
Q.105What is the default protocol used when testing a web server using
SSL encryption?
TLS is used when testing a web server using SSL encryption
Q.106How are Pre-Processor Elements executed in JMeter?
Pre-Processor Elements in JMeter are executed before each sampler. They
can modify or manipulate the requests or variables before they are sent to
the server. Each Pre-Processor element is executed sequentially before the
associated sampler.
Q.107Which file extension is accepted by JMeter for JDBC driver?
Jar
Q.108What is the order of execution for Post-Processor Elements?
Post-Processor Elements in JMeter are executed after each sampler. They
extract or process data from the server response and perform actions
based on that data. Post-Processor elements are executed sequentially
after the associated sampler.
Q.109What is the first step you want to do with every JMeter FTP Test
Plan?
Add jmeter.properties file in lib
Q.110When are Listeners executed in JMeter?
Listeners in JMeter are executed after each sampler. They collect and
display the results of the test execution, including response times,
throughput, error rates, and other performance metrics. Listeners provide
real-time feedback on the test progress.
Q.111What happens 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.
Q.112What is the last element to be executed in JMeter?
The last element to be executed in JMeter is typically the Test Action or
Shutdown Thread Group element. These elements are used to control the
termination of the test plan, either by stopping the test abruptly or allowing
the threads to finish gracefully.
Q.113How many JMS samplers can be used in Jmeter?
1
Q.114What are Scoping Rules in JMeter?
Scoping Rules in JMeter determine the visibility and accessibility of
elements within a test plan. They define the boundaries within which
elements can be accessed and executed, ensuring proper encapsulation
and control over the test execution flow.
Q.115What is the default port for LDAP over SSL
The default port for LDAP over SSL is 625
Q.116How do Scoping Rules affect the visibility of elements in JMeter?
Scoping Rules define the visibility of elements within their respective
scopes. Elements can only be accessed and executed within the scope
they belong to, and they are not visible or accessible outside of their scope.
Q.117What is the highest level of scope in JMeter?
The highest level of scope in JMeter is the Test Plan level. Elements placed
directly under the Test Plan are accessible from anywhere within the test
plan and have the broadest visibility.
Q.118How does the Thread Group level scope work in JMeter?
Elements placed directly under a Thread Group have access and visibility
only within that specific Thread Group. They are not visible or accessible
from other Thread Groups or elements outside the Thread Group.
Q.119What is the significance of the Controller level scope in JMeter?
Elements placed directly under a Controller (e.g., Loop Controller, If
Controller) have access and visibility only within that specific Controller.
They are not visible or accessible from other Controllers or elements
outside the Controller.
Q.120Explain the impact of scoping rules on variables in JMeter.
Variables in JMeter follow scoping rules, meaning they are only accessible
within their respective scope. Variables defined at the Test Plan level are
accessible throughout the entire test plan, while variables defined within a
Thread Group or Controller are accessible only within that specific scope.
Q.121How does scoping affect the execution of elements in JMeter?
Scoping rules ensure that elements are executed only within their scope.
Elements outside the current scope are not executed or considered during
the test execution, allowing for fine-grained control over the flow of
execution.
Q.122Can elements from one Thread Group access elements from
another Thread Group?
By default, elements from one Thread Group cannot directly access
elements from another Thread Group. Each Thread Group operates
independently, and elements are confined to their own scope. However,
communication between Thread Groups can be achieved through shared
resources like variables or properties.
Q.123How can you override scoping rules in JMeter?
Scoping rules can be overridden by using elements such as Include
Controller or Module Controller. These elements allow you to include or
reference elements from different scopes, enabling cross-scope access
and reuse of test plan components.
Q.124What is the scoping rule for elements placed under a Test Fragment
in JMeter?
Elements placed under a Test Fragment follow the scoping rules of the
element that references or includes the Test Fragment. They inherit the
visibility and accessibility of the element that encapsulates the Test
Fragment.
Q.125What are Properties and Variables in JMeter?
Properties and Variables in JMeter are used to store and manage dynamic
values during the test execution. They provide flexibility and enable
parameterization of test plans, allowing for customization and adaptability.
Q.126How are Properties different from Variables in JMeter?
Properties in JMeter are global and can be accessed from anywhere within
the test plan. They are typically defined in the "jmeter.properties" file and
can be modified before running the test. Variables, on the other hand, have
a local scope and are specific to a particular thread or controller.
Q.127How can you define a Property in JMeter?
Properties in JMeter are defined in the "jmeter.properties" file, located in
the JMeter installation directory. You can add or modify properties in this
file using a text editor.
Q.128What is the syntax to access a Property in JMeter?
Properties in JMeter can be accessed using the syntax
"${__P(propertyName)}". This syntax is used to reference the value of a
property in various JMeter elements, such as samplers, controllers, or
assertions.
Q.129How are Variables defined in JMeter?
Variables in JMeter can be defined at various levels, such as Test Plan,
Thread Group, or Controller. They can be created using the User Defined
Variables configuration element or by referencing them within a BeanShell
or JSR223 script.
Q.130What is the syntax to access a Variable in JMeter?
Variables in JMeter can be accessed using the syntax "${variableName}".
This syntax is used to reference the value of a variable in JMeter elements
like samplers, controllers, or assertions.
Q.131How can you modify the value of a Variable during the test
execution?
The value of a variable in JMeter can be modified using the User Defined
Variables configuration element, BeanShell or JSR223 script, or by using
functions like "__setProperty" or "__setPropertyThreadLocal".
Q.132Can Variables be shared between threads in JMeter?
By default, Variables in JMeter have thread-local scope and are not shared
between threads. However, you can use properties or functions like
"__setProperty" and "__setPropertyThreadLocal" to share variables across
threads.
Q.133How are Variables used for parameterization in JMeter?
Variables in JMeter are commonly used for parameterization, where they
are assigned different values for each thread or iteration. This allows for
dynamic input and data-driven testing by using variables to represent
different data sets or user inputs.
Q.134Can you override the value of a Variable within a Thread Group in
JMeter?
Yes, the value of a Variable can be overridden within a Thread Group.
Variables can be defined at different levels, and if a variable with the same
name is defined at a lower level (e.g., Thread Group or Controller), it takes
precedence over the higher-level definition.
Q.135Why is parameterization important in JMeter?
Parameterization is important in JMeter because it allows you to simulate
real-world scenarios by using different values for each iteration or thread. It
helps in creating dynamic and realistic test data, improving the accuracy
and effectiveness of performance testing.
Q.136How can you use variables to parameterize tests in JMeter?
Variables in JMeter can be used to store and assign dynamic values to
different test elements. By referencing variables in various fields, you can
input different values for each iteration or thread, enabling
parameterization of tests.
Q.137What are the benefits of using variables for parameterization in
JMeter?
Using variables for parameterization in JMeter offers several benefits:
Flexibility: Variables allow you to easily modify and manage test data
without changing the test plan structure. Reusability: Variables can be
reused across multiple test elements, reducing redundancy and improving
maintainability. Scalability: With variables, you can easily scale up the
number of iterations or threads while maintaining dynamic data input.
Data-driven testing: Variables enable data-driven testing by using different
sets of data for each iteration or thread.
Q.138How do you define and assign values to variables in JMeter?
Variables can be defined and assigned values in JMeter using different
approaches: User Defined Variables: Use the User Defined Variables
configuration element to define variables and assign values directly in
JMeter. Beanshell/JSR223 scripts: Use scripting languages like Beanshell
or JSR223 to dynamically assign values to variables based on custom logic
or calculations. CSV Data Set Config: Use the CSV Data Set Config element
to read values from a CSV file and assign them to variables for
parameterization.
Q.139Can you provide an example of using variables to parameterize
tests in JMeter?
Sure! Let's say you have a login request where you want to test with
different usernames and passwords. You can define variables like
${username} and ${password} in the User Defined Variables element and
assign different values to them for each iteration or thread.
Q.140How can variables be used to simulate different user inputs in
JMeter?
Variables can represent different user inputs by assigning values like
usernames, passwords, email addresses, or any other relevant data. By
using variables in the corresponding test elements, you can simulate a
variety of user scenarios during the test execution.
Q.141How can you use variables to dynamically generate random values
in JMeter?
JMeter provides functions like __RandomString or __Random that generate
random values. By assigning these functions to variables, you can
dynamically generate random values for parameterization during the test
execution.
Q.142Can you change the value of a variable during the test execution?
Yes, the value of a variable can be changed during the test execution. You
can use functions like __setProperty or __setPropertyThreadLocal to
update the value of a variable dynamically within a test plan.
Q.143How can variables be shared across different thread groups in
JMeter?
By default, variables have thread-local scope and are not shared across
different thread groups. However, you can use properties to share variables
across threads by using functions like __setProperty or
__setPropertyThreadLocal.
Q.144What are the considerations for using variables for parameterization
in distributed testing?
In distributed testing, where JMeter runs tests on multiple remote servers,
it's important to ensure that variables are properly synchronized and
consistent across the distributed nodes. You may need to use properties or
external data sources for sharing and synchronizing variables across the
distributed environment.
Q.145What are the different types of tests that can be performed using
JMeter?
JMeter can perform several types of tests, including load testing, stress
testing, functional testing, and regression testing.
Q.146What is a thread group in JMeter?
A thread group is a collection of users that simulate the behavior of real
users. It is the main element that controls how JMeter will send requests to
a server.
Q.147What is the purpose of a sampler in JMeter?
A sampler is used to send requests to a server and to collect responses
from the server.
Q.148What is the difference between a thread and a user in JMeter?
A thread is a virtual user that simulates the behavior of a real user. A user
is a real person who interacts with an application.
Q.149What is a listener in JMeter?
A listener is used to collect and display the results of a test run.
Q.150What is a timer in JMeter?
A timer is used to control the time delay between requests.
Q.151How can you parameterize a request in JMeter?
You can parameterize a request by using variables. Variables can be
defined in JMeter and used in requests.
Q.152What is correlation in JMeter?
Correlation is used to extract dynamic values from a response and use
them in subsequent requests.
Q.153What is assertion in JMeter?
Assertion is used to verify that a response meets certain criteria, such as
the presence of a particular string in the response.
Q.154What is throughput in JMeter?
Throughput is the number of requests that can be processed in a given
time.
Q.155What is latency in JMeter?
Latency is the time taken for a request to reach the server and get a
response.
Q.156What is ramp-up time in JMeter?
Ramp-up time is the time taken for all the threads in a test group to start
making requests.
Q.157What is the purpose of a CSV data set config in JMeter?
A CSV data set config is used to read data from a CSV file and use it in
requests.
Q.158How can you distribute load across multiple servers using JMeter?
You can use the distributed testing feature in JMeter to distribute load
across multiple servers.
Q.159What is the purpose of the HTTP cookie manager in JMeter?
The HTTP cookie manager is used to manage cookies sent by the server.
Q.160What is the purpose of the HTTP header manager in JMeter?
The HTTP header manager is used to manage HTTP headers in requests.
Q.161What is the purpose of the transaction controller in JMeter?
The transaction controller is used to group several requests into a single
transaction.
Q.162What is the purpose of the constant throughput timer in JMeter?
The constant throughput timer is used to control the rate at which requests
are sent to a server.
Q.163What is the purpose of the summary report listener in JMeter?
The summary report listener is used to display the summary of the test
results. It shows the number of requests, average response time, and more.
Q.164What is the purpose of the JMeter plug-in manager and how can you
use it?
The JMeter plug-in manager is a tool that allows you to install and manage
JMeter plug-ins. You can use it to add new functionality to JMeter, such as
additional samplers or listeners.
Q.165How can you test an application that requires user authentication in
JMeter?
You can test an application that requires user authentication by using the
HTTP authorization manager in JMeter. This manager allows you to
specify the credentials required for authentication.
Q.166What is the purpose of the JMeter script recorder and how can you
use it?
The JMeter script recorder is a tool that allows you to record user
interactions with a web application and create a JMeter test plan based on
those interactions. You can use it to quickly create a test plan for a web
application.
Q.167How can you simulate a realistic user load in JMeter?
You can simulate a realistic user load in JMeter by using a combination of
thread groups, ramp-up time, and loop counts. You can also use the pacing
timer to simulate realistic think time between requests.
Q.168What is the purpose of the JMeter command-line interface and how
can you use it?
The JMeter command-line interface allows you to run JMeter tests from
the command line, which is useful for automating tests and integrating
JMeter with other tools. You can use it to run tests in headless mode, or to
run tests as part of a continuous integration pipeline.
Q.169How can you use JMeter to test an API?
You can use JMeter to test an API by creating HTTP requests that
correspond to the API endpoints, and by specifying the required
parameters in those requests. You can use assertions to verify that the
responses meet the expected criteria.
Q.170What is the purpose of the JMeter dashboard report and how can
you generate it?
The JMeter dashboard report is a customizable report that displays the
results of a JMeter test run in a visual format. You can generate it by using
the JMeter command-line interface or by using the JMeter GUI.
Q.171What is the purpose of the JMeter distributed testing feature and
how can you use it?
The JMeter distributed testing feature allows you to run a test plan on
multiple JMeter instances, which can be useful for testing applications that
require a large number of virtual users. You can use it by setting up a
master-slave configuration and distributing the test plan among the slave
nodes.
Q.172How can you use JMeter to test the performance of a database
server?
You can use JMeter to test the performance of a database server by using
the JDBC request sampler to send SQL queries to the server. You can use
listeners to collect and display the results of the test.
Q.173How can you use JMeter to test the performance of a web service?
You can use JMeter to test the performance of a web service by creating
SOAP or REST requests that correspond to the service operations, and by
specifying the required parameters in those requests. You can use
assertions to verify that the responses meet the expected criteria.
Q.174What is the purpose of the JMeter variable and how can you use it in
your test plan?
JMeter variables allow you to store and reuse values throughout your test
plan, which can be useful for parameterization and data-driven testing. You
can use variables to store values extracted from responses, to generate
random data, or to read data from external sources such as CSV files.
Q.175How can you simulate a realistic network bandwidth in JMeter?
You can simulate a realistic network bandwidth in JMeter by using the
bandwidth shaping timer. This timer allows you to specify the desired
network speed and latency for your requests, which can be useful for
testing applications that rely on slow or unstable connections.
Q.176What is the purpose of the JMeter cookie manager and how can you
use it?
The JMeter cookie manager is a tool that allows you to manage cookies in
your test plan. You can use it to simulate user sessions that rely on
cookies, or to manipulate cookies for testing purposes.
Q.177How can you use JMeter to test the performance of a streaming
service?
You can use JMeter to test the performance of a streaming service by
using the TCP sampler to send and receive data over a socket connection.
You can use listeners to collect and display the results of the test.
Q.178What is the purpose of the JMeter assertion and how can you use it
in your test plan?
JMeter assertions allow you to verify that the responses of your requests
meet certain criteria, which can be useful for ensuring the correctness of
your application. You can use assertions to check for the presence or
absence of specific text or patterns in the response, to verify the status
code or headers of the response, or to validate the XML or JSON structure
of the response.
Q.179How can you use JMeter to test the performance of a streaming
video service?
You can use JMeter to test the performance of a streaming video service
by using the HTTP request sampler to simulate the requests made by a
video player, and by using the TCP sampler to simulate the data transfer.
You can use listeners to collect and display the results of the test.
Q.180How can you use JMeter to test the performance of a messaging
service?
You can use JMeter to test the performance of a messaging service by
using the JMS point-to-point or pub-sub samplers to send and receive
messages. You can use listeners to collect and display the results of the
test.
Q.181What is the purpose of the JMeter regular expression extractor and
how can you use it in your test plan?
The JMeter regular expression extractor allows you to extract specific
values from the response of your requests, which can be useful for
parameterization and data-driven testing. You can use regular expressions
to specify the patterns to match and the groups to capture.
Q.182How can you use JMeter to test the performance of a mobile
application?
You can use JMeter to test the performance of a mobile application by
capturing and analyzing the network traffic generated by the application,
and by using the appropriate JMeter samplers to simulate that traffic. You
can use listeners to collect and display the results of the test.
Q.183What is the purpose of the JMeter timer and how can you use it in
your test plan?
JMeter timers allow you to specify the pacing and concurrency of your
requests, which can be useful for simulating realistic user behavior. You
can use timers to introduce think time between requests, to simulate
bursts of traffic, or to synchronize multiple requests.
Q.184How can you use JMeter to test the performance of a web
application that uses WebSockets?
You can use JMeter to test the performance of a web application that uses
WebSockets by using the WebSocket sampler to send and receive
messages over a WebSocket connection. You can use listeners to collect
and display the results of the test.
Q.185How can you use JMeter to test the performance of a web
application that uses AJAX?
You can use JMeter to test the performance of a web application that uses
AJAX by using the HTTP request sampler to simulate the requests made by
the browser, and by using the Regular Expression Extractor to extract the
values needed for subsequent requests. You can use listeners to collect
and display the results of the test.
Q.186How can you use JMeter to test the performance of a RESTful web
service?
You can use JMeter to test the performance of a RESTful web service by
using the HTTP request sampler to send HTTP requests to the service, and
by using the JSON Path Extractor to extract the values needed for
subsequent requests. You can use listeners to collect and display the
results of the test.
Q.187How can you use JMeter to test the performance of a SOAP web
service?
You can use JMeter to test the performance of a SOAP web service by
using the SOAP/XML-RPC Request sampler to send SOAP requests to the
service, and by using the XPath Extractor to extract the values needed for
subsequent requests. You can use listeners to collect and display the
results of the test.
Q.188How can you use JMeter to test the performance of a database?
You can use JMeter to test the performance of a database by using the
JDBC Request sampler to execute SQL statements against the database,
and by using the Result Set Handler to extract the results of the query. You
can use listeners to collect and display the results of the test.
Q.189What is the purpose of the JMeter user parameter and how can you
use it in your test plan?
JMeter user parameters allow you to specify custom variables for each
user in your test plan, which can be useful for simulating realistic user
behavior. You can use user parameters to store user-specific data such as
usernames, passwords, or session IDs.
Q.190How can you use JMeter to test the performance of a website with
multiple user roles?
You can use JMeter to test the performance of a website with multiple user
roles by using the CSV Data Set Config element to read data from a CSV
file that contains different login credentials for each user role, and by using
the User Defined Variables element to define variables for each role. You
can use listeners to collect and display the results of the test.
Q.191How can you use JMeter to test the performance of a website with
dynamic content?
You can use JMeter to test the performance of a website with dynamic
content by using the Regular Expression Extractor to extract the dynamic
values needed for subsequent requests, and by using the While Controller
to repeat the requests until the expected response is received. You can use
listeners to collect and display the results of the test.
Q.192How can you use JMeter to test the performance of a website with
multiple language versions?
You can use JMeter to test the performance of a website with multiple
language versions by using the CSV Data Set Config element to read data
from a CSV file that contains different language preferences for each user,
and by using the HTTP Header Manager to set the Accept-Language
header for each request. You can use listeners to collect and display the
results of the test.
Q.193How can you use JMeter to test the performance of a website with
SSL/TLS encryption?
You can use JMeter to test the performance of a website with SSL/TLS
encryption by importing the SSL/TLS certificate into the JMeter keystore,
and by setting the protocol and cipher suites in the SSL Manager. You can
use listeners to collect and display the results of the test.
Q.194How can you use JMeter to test the performance of a website with
multiple authentication methods?
You can use JMeter to test the performance of a website with multiple
authentication methods by using the HTTP Authorization Manager to set
the authentication credentials for each request, and by using the If
Controller to handle different response codes for successful and
unsuccessful authentication. You can use listeners to collect and display
the results of the test.
Q.195How can you use JMeter to test the performance of a website with
CAPTCHA protection?
You can use JMeter to test the performance of a website with CAPTCHA
protection by using a third-party service such as DeathByCaptcha or
2Captcha to bypass the CAPTCHA challenge, and by using the Regular
Expression Extractor to extract the response token needed for subsequent
requests. You can use listeners to collect and display the results of the
test.
Q.196How can you use JMeter to test the performance of a website with
rate limiting?
You can use JMeter to test the performance of a website with rate limiting
by using the Constant Throughput Timer to set the maximum number of
requests per second, and by using the Response Assertion to handle the
rate limit exceeded error. You can use listeners to collect and display the
results of the test.
Q.197How can you use JMeter to test the performance of a website with
IP address restrictions?
You can use JMeter to test the performance of a website with IP address
restrictions by using a proxy server such as Charles Proxy or Fiddler to
intercept and modify the IP address of the requests, and by using the
Regular Expression Extractor to extract the response token needed for
subsequent requests. You can use listeners to collect and display the
results of the test.
Q.198How can you use JMeter to test the performance of a website with
complex workflows?
You can use JMeter to test the performance of a website with complex
workflows by using the Transaction Controller to group together related
requests, and by using the Logic Controllers such as the If Controller and
the While Controller to handle conditional and looping behavior. You can
use listeners to collect and display the results of the test.
Q.199How can you use JMeter to test the performance of a website with
heavy server-side processing?
You can use JMeter to test the performance of a website with heavy server-
side processing by using the Constant Timer to add think time between
requests, and by using the BeanShell Sampler to execute custom Java
code that can simulate the processing load. You can use listeners to
collect and display the results of the test.
Q.200How can you use JMeter to test the performance of a website with
rich media content?
You can use JMeter to test the performance of a website with rich media
content by using the HTTP Request Sampler to simulate the requests made
by the browser, and by using the HTTP Cache Manager to simulate the
browser cache. You can use listeners to collect and display the results of
the test.
Q.201How can you use JMeter to test the performance of a website with
third-party integrations?
You can use JMeter to test the performance of a website with third-party
integrations by using the HTTP Request Sampler to simulate the requests
made to the third-party services, and by using the JSR223 Sampler to
execute custom code that can handle the responses.
Q.202What is Apache JMeter testing?
Apache JMeter testing involves using the open source Apache JMeter
software for testing of software application. Apache JMeter testing is
applied for performance check of both static and dynamic
resources. Apache JMeter simulates a heavy load on application, to test
its strength or to analyze overall performance under different load types.

Apache JMeter is widely used for performance testing of web applications.


Apache JMeter is open source software and made in Java programming
language.

Q.203Is JMeter easy to learn?


Yes, Apache JMeter is very easy to learn if you are conversant with Java
programming language. Detailed documentation with examples and use
cases are listed on Apache JMeter website at link
- https://ApacheJMeter.apache.org/index.html

Various websites also list tutorials, videos and examples on using Apache
JMeter, as - https://www.vskills.in/certification/tutorial/information-
technology/ApacheJMeter-tester-certification/

Q.204How JMeter is used for performance testing?


Apache JMeter tests performance by load testing the functional behavior
of software application and measuring performance. Apache JMeter tests
performance both on static and dynamic resources. Apache JMeter is
widely used for performance testing of web applications.
Apache JMeter simulates a heavy load on application, to test its strength or
to analyze overall performance under different load types.

Conducting performance testing by Apache JMeter requires, Apache


JMeter test plan to be created. A Apache JMeter test plan lists steps which
Apache JMeter will run, when Apache JMeter is executed.

A Apache JMeter test plan has

• Thread Groups
• logic controllers
• sample generating controllers
• listeners
• timers
• assertions
• configuration elements

Q.205What is JMeter and how it works?


JMeter is actually, Apache JMeter and is open source software application
to conduct performance test on software applications. Apache JMeter is
extensively used for performance testing of web applications.

Apache JMeter works by executing a test plan, made by test engineer or


manager. The Apache JMeter test plan lists steps to execute. A Apache
JMeter test plan has

• Thread Groups
• logic controllers
• sample generating controllers
• listeners
• timers
• assertions
• configuration elements

Apache JMeter can conduct multiple test types, for Web (HTTP/HTTPS),
FTP, JDBC, LDAP, Database, Mail (SMTP/POP3) , REST.

Q.206Which is better LoadRunner vs JMeter?


JMeter is better, considering no purchase cost, huge support and available
documentation.

JMeter also scores more against LoadRunner as, JMeter can

• conduct multiple test types, for Web (HTTP/HTTPS), FTP, JDBC,


LDAP, Database, Mail (SMTP/POP3), REST.
• supports multiple operating system
• based on popular Java programming language
• has CLI and GUI mode

Q.207Does JMeter require coding?


To a minimum, Apache JMeter GUI minimizes the amount of coding
needed to prepare a test plan. Apache JMeter does performance testing
by executing test plans. Preparing the Apache JMeter test plan in central to
Apache JMeter.

But validation, verification or customization of test plan require coding for


quick and effective Apache JMeter testing.

Q.208Why JMeter is better than LoadRunner?


Apache JMeter is better than LoadRunner as

• being open source no purchase cost is involved


• documentation and huge support for Apache JMeter present globally
by volunteers
• easily customized as per need

Apache JMeter also can

• Do multiple test types, for Web (HTTP/HTTPS), FTP, JDBC, LDAP,


Database, Mail (SMTP/POP3), REST.
• runs on multiple operating system
• uses popular Java programming language
• provides both CLI and GUI mode

Q.209Which language is used in JMeter?


Apache JMeter uses Java programming language.
Apache JMeter tests performance by executing test plans. Apache JMeter
GUI reduces coding to prepare a test plan. With Apache JMeter GUI very
less coding in Java programming language, is needed.

Apache JMeter tests the functional behavior of software application and


measures its performance. Apache JMeter tests performance both on
static and dynamic resources. Apache JMeter is widely used for
performance testing of web applications.

Q.210Why do we use JMeter?


Apache JMeter does performance testing by load testing the functional
behavior of the software application and measures performance. Apache
JMeter tests performance both on static and dynamic resources. Apache
JMeter is widely used for performance testing of web applications.

Apache JMeter is used by users across the globe due to

• Open source, no purchase cost


• Wide availability of tutorials, videos, etc
• Extensive documentation
• Worldwide volunteers resolve issues

Q.211How do I start Apache JMeter?


Apache JMeter can be started in CLI Mode and GUI Mode

Execute jmeter.bat (on Windows) or jmeter (for Unix/Linux) file in bin


directory. By default GUI Mode opens up.

For CLI or command line mode run the above files in bin directory, with –n
flag.

CLI mode is used to run the test plans.

Q.212Can JMeter be used for .NET applications?


Yes, Apache JMeter tests the functional behavior of .Net application and its
performance. Apache JMeter tests performance both on static and
dynamic resources. Apache JMeter is widely used for performance testing
of web applications.

Apache JMeter can be used for


• Load Testing ASP.NET Sites
• Load Testing ASP.NET Web Applications
• Stress Testing ASP.NET
• Sending HTTP POST Request to an ASP.NET web-site
• ASP.NET WebForms Authentication

Q.213What is JMeter in selenium?


Both, Apache JMeter and Selenium can be integrated. Using Selenium in
Apache JMeter, by using Apache JMeter WebDriver plugin.

Copy the files of WebDriver plugin to libs and ext directory of Apache
JMeter. In Apache JMeter GUI, web browser specific tests can be executed
like Chrome test / Firefox test, etc.

Q.214Is JMeter used for functional testing?


Yes, Apache JMeter can test functional behavior of software application
and its performance. Apache JMeter tests performance both on static and
dynamic resources. Apache JMeter is widely used for performance testing
of web applications.

Apache JMeter is open source software and hence user can customize as
per their needs.

Q.215How many users can JMeter simulate?


Apache JMeter can simulate unlimited number of users.

Number of users is specified by the number of threads, in a test plan.

But, remember that the thread count is limited by the hardware resources
of the computer machine the test is conducted and number of file
descriptors else, testing speed will degrade.

Limitation can be circumvented by conducting distributed Apache JMeter


tests or using cloud solutions.

Q.216Can we automate JMeter?


Yes, we can automate Apache JMeter.

Automation can be implemented in Apache JMeter by

• Integrating with Maven under continuous testing of DevOps


• Using Apache JMeter GUI for test plan creation, reducing test plan
development.
• Saving and managing frequent test plans
• Using Robotic Process Automation tool

Q.217Who uses JMeter?


Apache JMeter is used by software development companies across the
globe like IBM, Oracle, Capgemini, TCS, etc.

Apache JMeter is used to test functional behavior of software application


and its performance. Apache JMeter tests performance both on static and
dynamic resources. Apache JMeter is widely used for performance testing
of web applications.

Q.218Can JMeter be used for API testing?


Yes, Apache JMeter supports testing of SOAP / REST Web services.

Performance testing of RESTful API can be done by Apache JMeter.

Q.219Who developed JMeter?


Stefano Mazzocchi, working at Apache Software Foundation, developed
Apache JMeter.

Apache Software Foundation later redesigned Apache JMeter’s GUI and to


added functional-testing capabilities.

Apache JMeter is open source software and hence user can customize as
per their needs.

Q.220Is JMeter a good tool?


Yes, of course Apache JMeter is a good tool.

Apache JMeter is good tool because

• Open source so, no purchase cost


• Can do multiple test types, for Web (HTTP/HTTPS), FTP, JDBC,
LDAP, Database, Mail (SMTP/POP3), REST.
• runs on multiple operating system
• uses popular Java programming language
• provides both CLI and GUI mode

Q.221Which tool is best for performance testing?


Apache JMeter is the best tool for performance testing.

Apache JMeter scores the most marks as

• Open source so, no purchase cost


• Can do multiple test types, for Web (HTTP/HTTPS), FTP, JDBC,
LDAP, Database, Mail (SMTP/POP3), REST.
• runs on multiple operating system
• uses popular Java programming language
• provides both CLI and GUI mode

Q.222Is JMeter an automation tool?


Yes, Apache JMeter is automation tool which automates performance
testing.

You can easily create a test plan or steps for executing a performance test
on software application by Apache JMeter GUI.

You can also integrate Apache JMeter with Maven for continuous testing
under DevOps and automate performance testing.

Q.223Is coding required for performance testing?


Yes, depending upon performance testing tool being used.

Apache JMeter performance testing tool is open source toll which has very
low coding requirement. Apache JMeter GUI minimizes the amount of
coding needed to prepare a test plan. Apache JMeter does performance
testing by executing test plans. Preparing the Apache JMeter test plan in
central to Apache JMeter.

But validation, verification or customization of test plan require coding for


quick and effective Apache JMeter testing.

Q.224What is JMeter script?


Apache JMeter script stores actions a user would take in the application
being tested. This helps in validating user behavior and application
performance under different load conditions.
Script helps in replaying user actions so as to better test the application for
more used functionality of the software application.

Q.225How do I open JMeter in non GUI?


For opening Apache JMeter in non GUI or CLI (command line )mode run
Apache JMeter.bat (on Windows) or Apache JMeter (for Unix/Linux) file in
bin directory, with –n flag.

Non GUI or CLI mode is used to run the test plans.

Q.226What is JTL file in JMeter?


JTL file in Apache JMeter, is the Apache JMeter Text Logs or JTL files. It
stores result of the test runs.

JTL is the default extension and any other extension can also be selected
before test execution.

If same JTL file is mentioned for different test runs, Apache JMeter
appends resultant data at end of the same file.

Q.227How do I record in JMeter?


Apache JMeter can record tests by using the Test Script Recorder. The web
browser used to record user actions, should be configured to use proxy
server for web requests.

Steps for recording in Apache JMeter -

1. Select Recording template in Apache JMeter GUI


2. Configure HTTP Request Defaults element
3. Click Start button in HTTP(S) Test Script Recorder
4. Configure browser to use the Apache JMeter Proxy
5. Record user actions by clicking Run then, Start

Q.228What is the latest JMeter version?


The latest Apache JMeter version is 5.1.1, as on date and was released on
19-March, 2019.

The latest Apache JMeter version 5.1.1, requires Java 8 and above.
The Apache JMeter version 5.1.1 has further enhancement from the base
version of Apache JMeter version 5

Apache JMeter is open source software and hence user can customize as
per their needs.

Q.229What is throughput in JMeter?


Throughput is, number of incoming requests being served or successfully
processed and output sent, as per set parameters, with in a time span like
seconds or minutes or even hours.

As per Apache JMeter documentation, throughput is requests/unit of time.

In Apache JMeter the unit of time taken for calculating the throughput, is
from start of the first sample to the end of the last sample. This time span
includes intervals between samples.

The Apache JMeter throughput formula is: Throughput = (number of


requests) / (total time).

Q.230What we can do with JMeter?


We can do performance testing with Apache JMeter . Apache JMeter is an
open source software application. Apache JMeter can do load testing of
the functional behavior of the software application under test. Apache
JMeter also logs the test result for measuring the performance.

Apache JMeter can be used to test performance both on static and


dynamic resources.

Apache JMeter has extensive usage in performance testing of web


applications.

Q.231How does JMeter calculate concurrent users?


Concurrent users in Apache JMeter points to multiple users doing same
operation at same time like 100s of users logging into software application,
at same time or concurrently.

Number of threads in Apache JMeter simulates concurrent connection to


the application under test. It can be configured in Apache JMeter test plan
for conducting concurrent users test. Configure concurrent thread group
for concurrent users in Apache JMeter.
Calculating concurrent users, is bit tricky as we can only guess the number
of concurrent users and it will be good if we make a guess
objectively. Calculating concurrent users in Apache JMeter can be done by
dividing unique visitors by their visit duration like 100 unique visitors per
minute with 10 minutes per visit results in 10 concurrent user per minute
(100/10).

Q.232How many threads can JMeter handle?


Apache JMeter can handle unlimited threads as it is influenced by
hardware capabilities and test plan design.

Correctly sizing the number of threads in Apache JMeter prevents memory


related issues

Distributed or cloud based testing can circumvent hardware capabilities


but test plan design is crucial in threads Apache JMeter can handle.

We can specify Number of threads in Apache JMeter. Multiple threads


simulate concurrent connection to application under test.

Q.233What are JMeter threads?


Apache JMeter thread execute test plan entirely and independently of other
threads. Each Apache JMeter thread usually indicates a single user,
interacting with application under test.

Apache JMeter thread is controlled by Apache JMeter thread group by


setting following options

• Number of Apache JMeter threads


• Ramp up period for Apache JMeter thread
• Number of times test should be executed

Q.234Can we integrate selenium with JMeter?


Yes, Apache JMeter and Selenium can be integrated. Use Selenium in
Apache JMeter, by making use of Apache JMeter WebDriver plugin.

Copy the files of WebDriver plugin to libs and ext directory of Apache
JMeter. In Apache JMeter GUI, web browser specific tests can be executed
like Chrome test / Firefox test, etc.

Q.235What is JMeter load time?


Load time usually refers to time needed to load a web page but in Apache
JMeter it refers to elapsed time.

Load time or elapsed time in Apache JMeter is the total time before a
request is sent and after the response is received.

Multiple threads simulate multiple connections or users, to application


under test. Apache JMeter load time refers to request send by a thread and
response received by the thread.

Apache JMeter load time = time after the response is received - time before
a request is sent

Q.236What is test plan and workbench in JMeter?


Apache JMeter test plan stores all individual elements needed to run the
test. It has all elements and their configuration needed to execute test, by
Apache JMeter on application under test (AUT).

A test plan has

• Thread group having multiple threads, simulating multiple


connections / users. We can configure count of threads, ramp up
period (time to activate all threads) and number of time to execute
the test.
• Sampler – which send request and wait for response. Different types
are as per need like HTTP/FTP/LDAP, etc
• Logic controller - used to control when to send request
• Listener – gather test result and can output graph/results tree
• Timer – used to add delay
• Assertions – to check received response

Apache JMeter workbench is just a temporary location to store test


elements during test execution. It is has no relation to test plan. Data
stores in Apache JMeter workbench is not saved unless configured but, is
not recommended.

Q.237How popular is JMeter?


Apache JMeter is very popular performance testing tool. It is open source
and has huge following amongst software testers across the globe.

Apache JMeter is used by software development companies across the


globe like IBM, Capgemini, Accenture Oracle, Capgemini, TCS, etc.
Q.238Is JMeter a free tool?
Yes, JMeter is open source tool and there is no cost to purchase and no
trial period for downloaded software. There is no licensing cost involved
with Apache JMeter download or usage.

There is no limitation on usage being enforced by Apache Foundation on


JMeter.

Only cost involved for a company is of training of the professionals, on the


JMeter.

What is JMeter?

The Apache JMeter application is free and open-source software that is made
entirely of Java and is used to load-test and measure the performance of
applications and different software products. It was created to test Web
applications, but it has now been expanded to include other test functions like
performance testing, load testing and stress testing.

JMeter can be used to test the performance of both static and dynamic assets, as
well as Web dynamic applications. It can be used to simulate a heavy demand on a
server, set of servers, network, or item in order to test its strength or examine the
entire performance under various load scenarios.

JMeter is a protocol analyzer, not a browser. JMeter appears to be a browser (or


rather, several browsers) when it comes to web services and remote services, but it
does not do all of the operations that browsers do. JMeter, in particular, does not
run Javascript present in HTML pages. It also doesn't produce HTML pages like a
browser (you can examine the answer as HTML and so on, but the timings aren't
included in any samples, and only one sample from each thread is ever displayed at
a time).

JMeter Interview Questions & Answers for


Freshers
1) Explain what is JMeter?
JMeter is a Java tool, which is used for performance Load Testing.
2) Explain how JMeter works?
JMeter acts like a group of users sending requests to a target server. It
collects response from the target server and other statistics which show
the performance of the application or server via graphs or tables.

3) Explain where you can use functions and variables?


Variables and functions can be written into any field of any test
component

4) Mention what are regular expressions in JMeter?


Based on the pattern, a regular expression is used to search and
manipulate text. JMeter is useful in interpreting forms of regular
expression or patterns being used throughout a JMeter test plan.

5) Explain what is Samplers and Thread groups?


• Thread group: For any test plan, JMeter is the beginning part of
thread group elements. It is an important element of JMeter,
where you can set a number of users and time to load all the users
given in the thread group
• Samplers: Sampler generates one or more sample results; these
sample results have many attributes like elapsed time, data size,
etc. Samplers allow JMeter to send specific types of requests to
the server, through samplers, thread group decides which type of
request it needs to make. Some of the useful samplers are HTTP
request, FTP request, JDBC request and so on.

6) Whether the test plans built using JMeter are OS


dependent?
Usually, Test Plan are saved in their XML format, so there is nothing to
do with any particular O.S. It can be run on any OS where JMeter can
run.

7) Mention what are the types of a processor in JMeter?


The types of a processor in JMeter are

• Pre-processor
• Post processor

JMeter Interview Questions & Answers for


Experienced
8) Explain what are Pre-processor Elements? List some
of the pre-processor elements?
A pre-processor is something that will happen before the 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 are

• HTTP URL re-writing modifier


• HTTP user parameter modifier
• HTML link parser
• BeanShell PreProcessor

9) Mention the execution order of Test Elements?


The test plans elements execution order is

• Configuration elements
• Pre-processors
• Timers
• Samplers
• Post-processors
• Assertions
• Listeners

10) What does “contain” and “matches” indicates in the


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

11) Explain what is the configuration elements?


A configuration element works parallel with a Sampler. To set up
defaults and variables for later use by samplers configuration elements
can be used. At the start of the scope, these elements are processed
before any samplers in the same scope.

12) Explain what is a timer in JMeter and what are the


types of it?
A JMeter thread by default will send requests continuously without any
pause. To get a pause between the request, Timers are used. Some of
the Timers used are Constant Timer, Gaussian Random Timer,
Synchronizing Timer, Uniform Random Timer and so on.

13) Explain what is Test Fragment?


Test fragment is also 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.
14) Explain what is Assertion in JMeter? What are the
types of assertion?
Assertion helps to verify that your server under test returns the
expected results

Some commonly used Assertion in JMeter are

• Response Assertion
• Duration Assertion
• Size Assertion
• XML Assertion
• HTML Assertion

15) Explain how you can reduce the resource


requirement in JMeter?
To reduce the resource requirements in JMeter

• Use non-GUI mode: jmeter –n –t test.jmx –l test.jtl


• During the load, a test doesn’t use “view results tree” or “view
results in table” listeners, use them only during the scripting
phase
• Don’t use functional mode
• Instead of using lots of similar samplers, use the same sampler in
a loop and use the variable to vary the sample

JMeter Interview Questions & Answers for 5+


Years Experience
16) Explain how you can 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.
7) Explain how you can capture the script of the
authentication window in JMeter?
Normally, you can capture script by recording.

• First, you have to Threadgroup in Testplan and then make


HTTPProxyServer in Workbench
• After that, set port number in the Global Setting box (e.g., 8911)
and modify your connection setting in IE as localhost in address
8911 as in port Then you can start http proxy server in JMeter and
run your application for login

18) List out few 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 and so on

19) What is distributed load testing? How can it be


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

20) In JMeter is it necessary to call embedded resources


explicitly?
You can eliminate all embedded resources from being explicitly called.
Requests have a checkbox at the bottom that says “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.

21) Explain what is the role of Timer in JMeter?


With the help of a timer, JMeter can delay the time between each
request, which a thread makes. It can solve the overload problem of the
server.

22) Explain what is Post-processor?


To perform any action after making a request, Post-processor is used.
For example, if JMeter sends an HTTP request to the web server, and if
you want JMeter to stop sending the request if the web server shows an
error, then you will use post-processor to perform this action.

23) What are the benefits that JMeter offers for


performance testing?
JMeter offers benefits on Performance Testing like

• It can be used to test performance for both, static resources as


well as dynamic resources
• It can handle a maximum number of concurrent users then your
website can handle
• It provides the graphical analyses of performance reports

11) What exactly do you know about a Workbench in Jmeter?

Many times while handling the tasks in Jmeter, the need for storing the test
elements is felt. Workbench stores them all on a temporary basis. In addition to the
testing elements, there are certain nontest elements that are also present in it.
There is a browser in this tool that helps in configuring these elements simply.
Keeping anything on the Workbench doesn’t actually mean it is stored in the
memory permanently.
12) Name an element in the JMeter that is powerful in representing a group of
virtual users that are responsible for performing different operations.

The name of this element is Thread Group

13) Explain the Ramp-up period?

When it comes to testing the loading of an app, only a few users are considered
then all for effectively studying the behavior of the app. This also derives a lot of
useful information to know the overall performance of the app. Of course, it takes
some time in making all the users in the running state. This time period is generally
called the Ramp uptime. It is different from different apps depending on the overall
number of users, data, and several other factors.

14) What are the benefits of using JMeter?

It is a very reliable told that always makes sure of error-free results. Its compatibility
with all the apps makes it the best in performing its task. JMeter is an open-source
tool and thus users need not worry about the cost. Learning and using this tool is
not at all a big deal. In addition to this, customization of the JMeter tool to fit the
exact needs is not at all a big deal. There are several tutorials and online
communities to help that can help to eliminate any problem that declares its
presence during the process.

15) What are the roles of Listeners in JMeter. Can you name a few of them?

Well, the prime role of listeners in the JMeter is to save the outcomes of tests after
viewing the same. Basically, they are also very useful when it comes to graphical
analysis as well as tabular analysis of the outcomes. A few of the commonly used
Listeners are:

1. Aggregate Graph
2. View results tree
3. Aggregate report

16) Name a few timers in JMeter. For what purpose they are considered?

Some of the common timers used in the JMeter are:

1. Synchronizing timer
2. Uniform random timer
3. Gaussian random timer
4. Constant timer
Many times test gassing of a thread needs to be stopped for a specific time. Timers
are used for the same purpose. They are capable to simply simulate the real user
thinking time.

17) What do you mean by the Rendezvous point?

Spike testing is a very common approach in Jmeter. Actually, there are certain tasks
that are associated with it. The prime task of the rendezvous point is to managing
spike testing without creating any issue. Actually, the synchronizing timer is
considered along with it to perform this task. You need to wait for the time till all the
active users reach a value that is assigned during the load test.

Looking for Best Jmeter Online Training Platform in Hyderabad? To Enroll a Free Demo Click

18) What do you know about assertions?

Samplers' requests are often made in the JMeter. The actual task of assertions is to
check certain values in acknowledging the requests from the samplers. Some of the
assertions which are used often are:

1. Xpath assertion
2. XML assertion
3. HTML assertion

In addition to these, another assertion i.e. Beansheel is also widely used for the
same purpose.

Related Article: JMeter Tutorial

19) What do you mean by Plan a Test?

There are certain elements that are useful in a performance test. Test Plan is
nothing but a logical packet that contains all those test elements. Some common
examples are Assertions, thread groups as well as samplers.

20) What do you know about the Pre-processors in JMeter?

Before the sample requests are accomplished, Pre-processors are executed.


Basically, these are nothing but the test plan elements that are helpful in ensuring
reliability. Some of the widely used Pre-processors in the JMeter are:

1. RegEx
2. Beanshell
3. Rewriting modifier
4. Link paper for HTML

Most Common JMeter FAQs

21) Is it possible to run JMeter in GUI? If so, explain how?

Yes, it is possible to run the JMeter in GUI. For this, a simple command is used and
i.e.

:jmeter -n -ttest.jmx -l test.jtl

22) How JMeter works?

It works very simply. There is nothing much you need to do. Actually, it simply acts
as a pool of users that often sends their requests to the server. Collecting all the
responses from the server is the responsibility of the JMeter. These responses are
then considered for analyzing the performance of the apps.

23) What are the different protocols that are supported by JMeter?

For testing web applications, JMeter uses Web protocols such as HTTPS as well as
HTTP. When it comes to testing the service applications, both Rest and SOAP are
supported by JMeter. In addition to this, it supports HTTP and JDBC for analyzing the
applications of the database. Another common protocol that JMeter handles is the
Lightweight Directory Access Protocol (LDAP). Also, the protocols for testing the mail
servers such as IMAP and SMTP are compatible with JMeter.

24) How would you compare JMeter with other similar tools?

The best thing is its GUI which is very simple as well as intuitive as compared to
other tools. It really doesn’t matter which platform you use on computers. Like
other tools, it doesn’t face any compatibility issues. Also, it’s a freely available tool
due to its open-source nature. JMeter is having a very unique feature in it that most
of the other tools lack and i.e. it can be used easily for automated testing of the
apps. The extensible nature makes it simply the best as compared with others. In
addition to this, it permits concurrent sampling very easily. All the test plans can be
prepared in XML format in JMeter.

25) What are the main parts of a Thread Group?

The main parts of Thread Group as mentioned below

1. Controller: which controls the entire flow of the thread group


2. Assertion: This is responsible for time management. Basically, it checks
whether the response is there within the specified time or not.
3. Sampler: Its task is to send different requests to the server
4. Configuration elements: It manages information related to the requests
that are to be integrated with samplers
5. Listeners: Its task is to save the final outcome of the run.

26) How sampler and logical controllers in JMeter are different?

Both these controllers have their own tasks for which they are responsible. The
controller sampler ensures all the requests are met by the server. On the other
hand, the Logical controller is responsible for changing the manner of processing
the requests that are originated from the elements.

27) What are the features of Configuration elements?

All the variables, as well as defaults that are used in the samplers, are created
through Configuration elements. In case the need to change the request raised by
the sampler is felt, configuration elements can perform this task. With the help of
this, Java testing can be made simple by setting the default values. Configuration
elements are very helpful when it comes to setting more than one user logins for
the web pages. Also, default values can be set which it which are used by the HTTP
controller.

28) Name at least 10 Listeners that JMeter is equipped with?

A lot of Listeners are present and each is responsible for performing a specific task.
They are:

1. Summary Report
2. Graph Results
3. Spline Visualizer
4. Monitor Results
5. Data writer
6. Response time graph
7. Mailer Visualizer
8. Aggregate results
9. Backend listener
10. Bean Shell Listener

29) What are the applications that you can test with JMeter?

There are certain types of apps that you can test and a few of them are FTP, TCP,
Websites, Shell Scripts, SMTP, JDBC, and LDAP.

30) What are Post-Processors in JMeter?


They are quite similar to the Pre-Processors. The only difference is they are used
after the accomplishment of sampler requests. They can easily be used when it
comes to taking values from the sampler response.

31) What do you know about the Concurrent user hit in JMeter?

A concurrent user hit is when a very large number of users clash for a similar event
of the app under lost test simultaneously. It is because this concurrency point is
considered which makes the virtual users wait until others are already running the
scripts.

You might also like