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.
Explain How Jmeter Works?
JMeter acts like a group of users sending requests to a target server. It collects response from target server and other statistics which show the performance of the application or server via graphs or tables.
Explain Where You Can Use Functions And Variables?
Variables and functions can be written into any field of any test component.
Mention What Are Regular Expressions In Jmeter?
Based on the pattern, regular expression are 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 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 need to make. Some of the useful samplers are HTTP request, FTP request, JDBC request and so on.
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.
Mention What Are The Types Of Processor In Jmeter?
The types of processor in JMeter are:
Explain What Are Pre-processor Elements? List Some Of The Pre-processor Elements?
A pre-processor is something that will happen before 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
Mention The Execution Order Of Test Elements?
The test plans elements execution order is
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 means the regular expression matched the whole target. So, ‘alphabet’ is “matched” by ‘al.*t.’
Explain What Is 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.
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.
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.
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
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, test doesn’t use “view results tree” or “view results in table” listeners, use them only during scripting phase
Don’t use functional mode
Instead of using lots of similar samplers, use the same sampler in loop and use variable to vary the sample
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.
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 Global Setting box (e.g., 8911) and modify your connection setting in IE as local host in address 8911 as in port Then you can start http proxy server in JMeter and run your application for login.
List Out Few Jmeter Listeners?
Some of the JMeter Listeners are:
View Result Tree
View Result in Table
Summary Report and so on
What Is Distributed Load Testing? How It Can Be Achieved?
Distributed load testing is the process through which numerous systems can be used for simulating load of a large number of users. By using the master-slave configuration, JMeter can do distribute load testing.
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.