• LOGIN
  • No products in the cart.

Apache JMeter Interview Questions And Answers

What is JMeter? What are the other applications that can be tested using JMeter?

Apache JMeter is an open source software. It is 100% pure Java desktop application designed to load test functional behavior and measure performance of the client/server applications.

1. It was originally designed for testing Web Applications only but has since then evolved to test other apps.
2. It’s useful in testing the performance of both static and dynamic resources like files, Servlets, Perl scripts, Java Objects, Data Bases, Queries, FTP Servers and more.
3. JMeter can also perform various other types of testing like Functional, Regression, and Unit testing.

Name the protocols supported by JMeter?

Following are some of the protocols supported by JMeter.

1. Web Protocol: To test the web applications, it supports both HTTP and HTTPS protocols.
2. Web Services: To test web services applications, it supports both SOAP and REST.
3. FTP: File Transfer Protocol provides the support for testing the FTP servers and applications.
4. Database via JDBC: used for testing the database applications.
5. LDAP: Lightweight Directory Access Protocol
6. Message-oriented middleware (MOM) via JMS
7. Mail: used for testing of mail servers such as SMTP(S), POP3(S) and IMAP(S)
8. MongoDB (NoSQL): it is recently supported protocol by JMeter.
9. Native commands or shell scripts
10. TCP

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.

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.

Mention what are the types of a processor in JMeter?

The types of a processor in JMeter are

  • Pre-processor
  • Post processor

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

Mention the execution order of Test Elements?

The test plans elements execution order is

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

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.

What is Assertion in JMeter? What are the types of assertion?

List the types of Assertion.

Assertion helps to verify that your server under test returns the expected results.

The Types of Assertion include:

  • Response Assertion – It facilitates the user by comparing the server response against a string pattern to check that the result is as expected.
  • Duration Assertion – You may need to test the response from the server reaches in user-defined time. If it takes longer than the defined time, server response fails.
  • Size Assertion – It is to test that each response coming from server holds the expected number of bytes. It facilitates the user to specify the size.
  • XML Assertion – It verifies that the response coming from the server holds the data in a correct XML format.
  • HTML Assertion – It is helpful for checking the syntax of the response data.

List out some of the JMeter Listeners?

Some of the JMeter Listeners are

  • Spline Visualizer
  • Aggregate Report
  • View Result Tree
  • View Result in Table
  • Monitor Results
  • Distribution Graph(alpha)
  • Bean Shell Listener
  • Summary Report
  • Aggregate Graph
  • Assertion Results
  • Backend Listener
  • Comparison Assertion Visualizer
  • Generate summary results
  • Graph Results
  • JSR223 Listener
  • Mailer Visualizer
  • Response Time Graph
  • Save responses to a file
  • Simple data writer
JMeter online training

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 graphical analyses of performance reports
List the important features of JMeter

Following are some of the key features of JMeter.

  • It’s open-source software and is freely available.
  • It has a very simple and intuitive GUI.
  • JMeter can do load and performance test of many different server types like Web – HTTP, HTTPS, SOAP, Database via JDBC, LDAP, JMS, Mail via POP3.
  • It is a platform-independent tool. On Linux or Unix, the user can open the JMeter tool by clicking on the JMeter shell script. However, on Windows, it can be invoked by starting the jmeter.bat file.
  • It has full Swing and lightweight component support (precompiled JAR uses packages java.swing.* ).
  • JMeter prepares test plans in XML format.
  • It’s a full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
  • It is highly extensible.
  • Can also be used to perform automated and functional testing of your application.
List some of the test plan elements available in JMeter.

A complete Test Plan comprises of one or more of the following elements.

  • ThreadGroup
  • Controllers
  • Listeners
  • Timers
  • Assertions
  • Configuration Elements
  • Pre-Processor Elements
  • Post-Processor Elements
Explain the role of Workbench?

It is an area to store test elements while you are in the process of constructing a test. Once you’ve finished designing the test items in the Workbench, you can copy or move them into the Test Plan.

It also contains non-test elements like:

1. Http mirror server
2. Http Proxy server

List down some of the main parts of Thread Group.

Following are the parts of a thread group.

  • Sampler: It sends various types of requests to the server.
  • Listeners: It saves the results of the Run. It can be opened for viewing also.
  • Timer: It makes the run more realistic by inserting delays between the requests.
  • Controller: It is responsible for controlling the flow of the thread group. An example scenario is where the request definition includes if-then-else or loop structure.
  • Config Element: information about the requests to be added to work with samplers.
  • Assertion: To check if the response is generated within the given time and contain the expected data.
What is a Configuration element? List down its elements.

Configuration Element allows you to create defaults and variables to be used by Samplers. It can be used to add or modify requests made by the Samplers. It will get executed at the beginning of the scope before any Samplers present in the same range. Thus, we can say that access to a configuration element is only allowed from inside the branch where it is present.

Following are the key features of Configuration Element.

  • CSV Data Set Config: It supports reading line by line from a file and splitting the line into variables.
  • HTTP Authorization Manager: You can specify one or more user logins for web pages that are restricted using server authentication.
  • Java Request Defaults: Using this you can set default values for Java testing.
  • HTTP Cookie Manager: The Cookie Manager element has two functions:
    i. It stores and sends cookies just like a web browser.
    ii. Second, you can manually add a cookie to the Cookie Manager. However, if you do this, the cookie will be shared by all JMeter threads.
  • HTTP Request Defaults: It lets you set default values to be used by your HTTP Request controllers.
  • HTTP Header Manager: It enables you to add or override the HTTP request headers.
Explain what is Pre-processor Element? Name a few of them.

It enables configuring a sample request before executing it or to update those variables present in the response text that may not be extracted.

Some of the main pre-processor elements are as follows.

  • A modifier for HTTP URL.
  • HTTP user parameter modifier.
  • HTML link parser.
  • BeanShell pre-processor.
What is the execution order of Test Elements in Test Plan of JMeter?

Following is the order of execution of the Test Plan elements.

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

What are the different ways of Data Parameterization in JMeter?

Data Parametrization makes the scripts reusable where the values is not required to be hardcoded for the same request with different parameters.

Below is the data parametrization that is supported in JMeter:

  • CSV Data Set Config
  • User-Defined Variables.

What are the major differences between JMeter and Load Runner.

JMeter is considered as the major competitor of Load Runner in the industry.

 Enlisted are some of the major differences:

Load Runner Jmeter
Licensed Software Open Source tool.
Developed by Mercury Developed by Apache.
UI is very impressive It lacks in UI
It has more technical capabilities. Less technically sound as compared to Load Runner.
Supports SAP, Siebel and Peoplesoft. Doesn’t support SAP and Siebel

List JMeter supported protocols.

The protocols supported by JMeter are:

  • Web: HTTP, HTTPS sites ‘web 1.0’ web 2.0
  • Web Services: SOAP / XML-RPC
  • Database via JDBC drivers
  • Directory: LDAP
  • Messaging Oriented service via JMS
  • Service: POP3, IMAP, SMTP
  • FTP Service

What is BeanShell scripting?

BeanShell is a lightweight Java scripting that is used in JMeter to perform some complex task. BeanShell sampler can perform various functions with the use of coding. You can print the thread number, get the current sampler executed, fetch the cookies, etc.

jMeter Training

What are the types of the controller in JMeter?

Controllers are used in JMeter to control the flow of execution of requests.

Below are the controllers that are used in JMeter:

  • Recording controller
  • IF controller
  • While controller
  • Transaction controller
  • Loop controller
  • Simple controller
  • Module controller
What is the execution order of Test Elements?

The execution order of Test Elements is in the following sequence:

  • Configuration elements
  • Pre-Processors
  • Timers
  • Sampler
  • Post-Processors (unless SampleResult is null)
  • Assertions (unless SampleResult is null)
  • Listeners (unless SampleResult is null)
What are the uses of Monitor Test?

Some of the uses of Monitor Test are:

  • Monitors are useful for stress testing and system management.
  • Used with stress testing, the monitor provides additional information about server performance.
  • Monitors make it easier to see the relationship between server performance and response time on the client-side.
  • As a system administration tool, the monitor provides an easy way to monitor multiple servers from one console.
May 14, 2020
GoLogica Technologies Private Limited. All rights reserved 2024.