#1. What Is Jmeter?: Must Read
#1. What Is Jmeter?: Must Read
#1. What Is Jmeter?: Must Read
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.
• 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
• Pre-processor
• Post-processor
• Beanshell PreProcessor
• BSF PreProcessor
• HTML Link Parser
• HTTP URL Re-writing Modifier
• JDBC PreProcessor
• JSR223 PreProcessor
• RegEx User Parameters
• Sample Timeout
• User Parameters
• 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
• 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.
• 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.
• Configuration elements
• Pre-processors
• Timers
• Samplers
• Post-processors (unless SampleResult is null)
• Assertions (unless SampleResult is null)
• Listeners (unless SampleResult is null)
• 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.,
Functions and variables can be written into any field of any test component in
order to make the script reusable.
Syntax of Variable:
${VARIABLE}
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.
It can be done using the CSV Data Set Config file or User Defined Variables.
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
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.
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.
Such that response can be seen in HTML format but the actual timings are
not there in the generated samples.
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.
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.
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.
2. Then enter the port number which you want to start your proxy server
from.
5. Lastly configure the browser with manual proxy settings pointing to the
same port number used in the test script recorder.
2. Second set up a proxy on the mobile wifi settings and then enter the
same port number that is used in the recorder.
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.
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.
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.
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.
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.
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.
Such that the components of workbench does not get saved with the test
plan automatically. They have to be saved separately as test fragments.
Various websites also list tutorials, videos and examples on using Apache
JMeter, as - https://www.vskills.in/certification/tutorial/information-
technology/ApacheJMeter-tester-certification/
• Thread Groups
• logic controllers
• sample generating controllers
• listeners
• timers
• assertions
• configuration elements
• 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.
For CLI or command line mode run the above files in bin directory, with –n
flag.
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.
Apache JMeter is open source software and hence user can customize as
per their needs.
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.
Apache JMeter is open source software and hence user can customize as
per their needs.
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.
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.
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.
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.
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.
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.
Load time or elapsed time in Apache JMeter is the total time before a
request is sent and after the response is received.
Apache JMeter load time = time after the response is received - time before
a request is sent
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.
• Pre-processor
• Post processor
• Configuration elements
• Pre-processors
• Timers
• Samplers
• Post-processors
• Assertions
• Listeners
• Response Assertion
• Duration Assertion
• Size Assertion
• XML Assertion
• HTML Assertion
• Spline Visualizer
• Aggregate Report
• View Result Tree
• View Result in Table
• Monitor Results
• Distribution Graph
• BeanShell Listener
• Summary Report and so on
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.
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.
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?
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.
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
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.
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.
1. RegEx
2. Beanshell
3. Rewriting modifier
4. Link paper for HTML
Yes, it is possible to run the JMeter in GUI. For this, a simple command is used and
i.e.
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.
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.
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.
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.
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.