JMeter Interview Questions
JMeter Interview Questions and Answers
1) What is Jmeter?
• A multifunctional open source software testing tool with huge online community support and large database of fans.
• Jmeter is developed in Java. Due to its pluggable nature with different tools, it is giving huge competition to different tools and has occupied large market share in software testing and is growing day by day.
• Jmeter is used for different types of testing – Performance Testing, Functional Testing, Regression Testing, Unit Testing.
2) Give a brief history about Jmeter?
A Brief History of Jmeter:
Stefano Mazzocchi is credited for being the developer of this unique tool- Apache JMeter, which is claimed to have been developed to test the strength and performance of the Apache JServ. However; it was later redesigned to make it capable of doing, performance testing, functional testing, regression testing, and unit testing as well.
Since November 2011, the Apache JMeter project has been included in the group of the company’s Top Level projects and today it consists of a separate website and a dedicated Project Management Committee to handle its operations and to provide assistance.
3) 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.
4) What is Performance Testing?
Performance Testing is performed to determine response time of the some components of the system perform under a particular workload. It is generally measured in terms of response time for the user activity. It is designed to test the overall performance of the system at high load and stress condition. It identifies the drawback of the architectural design which helps to tune the application.
5) What is Load Test?
This test is basically used for exercising\discovering the system under the top load it was designed to operate under.
6) What is distributed load testing? How can it be achieved in JMeter?
Distributed load testing is the process using which multiple systems can be used for simulating load of large number of users. The reason of using more than one system for load testing is the limitation of single system to generate large number of threads (users). In JMeter we can do distributed load testing using the master slave configuration.
7) What is concurrent user hits in load testing?
When the multiple users, without any time difference, hits on a same event of the application under the load test is called a concurrent user hit. The concurrency point is added so that multiple Virtual User can work on a single event of the application. By adding concurrency point, the virtual users will wait for the other Virtual users which are running the scripts, if they reach early. When all the users reached to the concurrency point, only then they start hitting the requests.
8) 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 the graphical analyses of performance reports
9) What is baseline testing?
Baseline testing is a testing which is performed on the application before coming to any conclusion. It can be either the verification or validation process which provides an idea of what the next stage has to do. It is very important testing technique, if done properly, 85% of performance problems can be identified and solved when proper baseline tests are done.
10) What is the need for Performance testing?
Performance testing is needed to verify the below:
• Response time of application for the intended number of users
• Maximum load resisting capacity of application.
• Capacity of application to handling the number of transactions.
• Stability of application under expected and unexpected user load.
• Ensuring that users have proper response time on production
11) What is the reason behind performing automated load testing?
Following drawbacks of manual Load Testing that leads to Automation load testing:
• Difficult to measure the performance of the application accurately.
• Difficult to do synchronization between the users.
• Number of real time users are required to involve in Performance Testing
• Difficult to analyze and identify the results & bottlenecks.
• Increases the infrastructure cost
12) What is performance tuning?
To improve the system performance we follow a mechanism, known as Performance tuning. To improve the systems performance there are two types of tuning performed they are,
• Hardware tuning: Optimizing, adding or replacing the hardware components of the system and changes in the infrastructure level to improve the systems performance is called hardware tuning.
• Software tuning: Identifying the software level bottlenecks by profiling the code, database etc. Fine tuning or modifying the software to fix the bottlenecks is called software tuning.
13) What is Spike testing and how can we perform it in JMeter?
Suddenly spiking or increasing the number of users at certain point of application and then monitoring the behavior at that intervals is spike testing.
In JMeter spike testing can be achieved using Synchronizing Timer. Synchronizing timer blocks the threads until a particular number of threads have been blocked, and then release them at once thus creating large instantaneous load.
14) 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)
15) 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 controllers, and sample generating controllers, listeners, timers, assertions, and configuration elements.
16) What are Controllers and its types?
JMeter has two types of Controllers, they are
• Samplers Controllers
• Logical 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.
17) What are listeners in Jmeter?
Listeners in Jmeter are used to capture the response data of load test. We can have response data (result) in cvs, image (graph) or in html format.
18) Name 4 to 5 listeners in jmeter, which are commonly used?
• View result tree
• Summary report
• Aggregate Graph
• Response time vs. thread
• Composite graph
19) What is median in jmeter listener?
It is a number which divides the samples into two equal halves. Half of the samples are smaller than the median, and half are larger.
20) What is throughput in jmeter listener?
Throughput is relation between time and data. It shows the relation between http request and unit time. Means how many requests are processed in how much time.
Throughput = Number of requests / Time(second or millisecond)
21)What is heap size in jmeter?
Jmeter is work in java, and heap size is related to java. Java heap is the heap size allocated to JVM applications which takes care of the new objects being created. If the objects being created exceed the heap size, it will throw an error of java.lang.out.of.memory.
Java’s default heap size limit in Jmeter is 256 MB.
22) Is it possible that, if we increase the heap size in Jmeter, then application(jmeter) might not work?
Yes, it is possible. Because heap size depends upon the empty space of your machine in c drive as well as your RAM. If the RAM is 1 GB and you increased the heap 2048, it may not work.
23)What is 90% line in JMeter?
• The aggregate report listener have 90% line as one of the metric. The Apache JMeter manual describes 90% line as- “90% of the samples took no more than this time”. It is actually the 90 percentile of the response times of the samples –
• 90 percentile = (90/100)*N+1/2 where N is the number of samples
• So, if there are 10 samples then 90%line will be 9.5 or 9. It means the 9th value in the sorted list of samples (sorted according to ascending order of their response times) will be the 90%line value.
24) What is Blaze Meter?
Blaze Meter is a cloud based service compatible with Apache JMeter. It generates large amount of instant load and provide very comprehensive reporting and analysis features.
In Blaze meter we can just upload the JMeter script and run the load test on cloud with predefined number of users.
25) What is correlation?
Correlation is the most important aspect of scripting. It generally includes fetching dynamic data from preceding requests/calls and posting it to the subsequent requests.
26) Explain parameterization in JMeter?
Parameterization is process of generalizing some user input, so as to use it for multiple users or executions.
27) Which Jmeter elements are used for Parameterization?
• User parameter
• CSV Data Set config
28) Explain what a timer in JMeter is 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, and Uniform Random Timer and so on.
31)Explain what is the role of Timer in JMeter?
With the help of timer, JMeter can delay the time between each request, which a thread makes. It can solve the overload problem of the server.
29) 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,
• Response Assertion
• Duration Assertion
• Size Assertion
• XML Assertion
• HTML Assertion