Jmeter

JMeter is a load testing tool for analyzing and measuring performance. If you are preparing for the role of Performance test engineer, then you will find these interview question on JMeter helpful for your next job interview.



Q.1 Explain 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.2 How 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.3 What 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.4 What 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.5 How 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.6 What 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.7 What 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.8 What 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.9 What 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.10 How 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.11 How 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.12 Would 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.13 Can 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.14 How 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.15 Let 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.16 What 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.17 Which programming language does JMeter is based on?
Jmeter is based on Java programming language and not on other programming languages.
Q.18 Which XML parser is present in Jmeter?
JMeter comes with Apache's Xerces XML parser and not with other listed options.
Q.19 What 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.20 Which file extension is accepted by JMeter for JDBC driver?
Jar
Q.21 What is the first step you want to do with every JMeter FTP Test Plan?
Add jmeter.properties file in lib
Q.22 What 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.23 How many JMS samplers can be used in Jmeter?
1
Q.24 What is the default port for LDAP over SSL
The default port for LDAP over SSL is 625
Q.25 What 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.26 Is 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.27 How 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.28 What 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.29 Which 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.30 Does 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.31 Why 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.32 Which 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.33 Why 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.34 How 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.35 Can 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.36 What 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.37 Is 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.38 How 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.39 Can 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.40 Who 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.41 Can 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.42 Who 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.43 Is 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.44 Which 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.45 Is 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.46 Is 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.47 What 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.48 How 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.49 What 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.50 How 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.51 What 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.52 What 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.53 What 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.54 How 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.55 How 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.56 What 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.57 Can 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.58 What 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.59 What 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.60 How 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, Oracle, Capgemini, TCS, etc.

Q.61 Is JMeter a free tool?

Yes, Apache 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 Apache JMeter.

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

Get Govt. Certified Take Test