Jmeter Interview Questions

What is Jmeter?

Jmeter is one of the Java tools which is used to perform load testing client/server applications.
Apache JMeter is open source software, a 100% pure Java desktop application
Designed to load test functional behavior and measure performance of the application.
It was originally designed for testing Web Applications but has since expanded to other test functions

What are the other applications tested by Jmeter?

JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more)

What do u see when u open a jmeter?

By default, Test Plan and Workbench can be seen.

What is Test Plan in Jmeter?

Test plan describes a series of steps JMeter will execute when run.
A complete test plan will consist of one or more Thread Groups, logic conrollers, sample generating controllers, listeners, timers, assertions, and configuration elements.

What is Work bench?

The Workbench is simply an area to store test elements while you are in the process of constructing a test. The Workbench is a sandbox for any test or portion of a test that you are working on. When you are ready to test what you have designed in the Workbench, you can copy or move the elements into the Test Plan.
It also contains Non- Test Elements: Http mirror sever and Http Proxy server which is not available in the thread group & Test plan

What is Thread Group?

Thread group elements are the beginning points of any test plan. All controllers and samplers must be under a thread group. Listeners, may be placed directly under the test plan, in which case they will apply to all the thread groups. The controls for a thread group allow you to: Set the number of threads and Set the ramp-up period and Set the number of times to execute the test

What are the parts of thread group?

Sampler :Sends various types of requests to the server
Listeners : Results of the Run can be viewed & saved
Timer : Makes th erun more realistic by inserting delays between the requests
Controller : responsible for controlling the flow of the thread group.If we have defined request to be executed on some logic like if-then-else or loop structure in java
Config Element : Info about the requests are added to work with samplers using this.
Assertion : To check if the responses are within given time and containing expected data.

What are Controllers and its types?

JMeter has two types of Controllers :

Samplers Controllers
Samplers tell JMeter to send requests to a server. For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request. You can also customize a request by adding one or more Configuration Elements to a Sampler.

Logical Controllers
Logical Controllers let you customize the logic that JMeter uses to decide when to send requests. Logic Controllers can change the order of requests coming from their child elements. For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Samplers.

What is Configuration element?

A configuration element works closely with a Sampler. Configuration elements can be used to set up defaults and variables for later use by samplers. Note that these elements are processed at the start of the scope in which they are found, i.e. before any samplers in the same scope.

Its elements:

CSV Data Set Config: Used to read lines from a file, and split them 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: You can set default values for Java testing
HTTP Cookie Manager: The Cookie Manager element has two functions: 
It stores and sends cookies just like a web browser.
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: This element lets you set default values that your HTTP Request controllers use.
HTTP Header Manager : The Header Manager lets you add or override HTTP request headers

What are Listeners?

A listener is a component that shows the results of the samples
The results can be shown in a tree, tables, graphs or simply written to a log file

The Graph Results listener plots the response times on a graph.
The "View Results Tree" Listener shows details of sampler requests and responses, and can display basic HTML and XML representations of the response.
Other listeners provide summary or aggregation information.

Every listener in JMeter provides a field to indicate the file to store data to.
They also provide means to view, save, and read saved test results.