1). Explain what is JMeter?
JMeter is a Java tool, which is used for performance Load Testing.
2) Explain how JMeter works?
JMeter acts like a group of users sending requests to a target server. It collects response from the target server and other statistics which show the performance of the application or server via graphs or tables.
3) Explain where you can use functions and variables?
Variables and functions can be written into any field of any test component
4) 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.
5) 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 requests, FTP requests, JDBC requests, and so on.
6) Whether the test plans built using JMeter are OS-dependent?
Usually, Test Plan is 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.
7) Mention what are the types of a processor in JMeter?
The types of a processor in JMeter are
8) 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
9) Mention the execution order of Test Elements?
The test plans elements execution order is
Configuration elements
10) What do "contain" and "matches" indicate in the regular expression?
The regular expression contains indicates that the regular expression matched at least some part of the target. While matches mean the regular expression matched the whole target. So, the ‘alphabet’ is “matched” by ‘al.*t.’
11) Explain what is the 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.
12) 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.
13) Explain what is Test Fragment?
Test fragment is also a type of element like the 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.
14) Explain what is Assertion in JMeter? What are the types of assertions?
Assertion helps to verify that your server under test returns the expected results
Some commonly used Assertion in JMeter are
15) Explain how you can reduce the resource requirement in JMeter?
To reduce the resource requirements in JMeter
16) 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 releases them all together thus creating a sizeable instantaneous load.
17) Explain how you can capture the script of the authentication window in JMeter?
Usually, you can capture the script by recording.
First, you have to Threadgroup in Testplan and then make HTTPProxyServer in Workbench
After that, set port number in the Global Setting box (e.g., 8911) and modify your connection setting in IE as localhost in address 8911 as in port Then you can start http proxy server in JMeter and run your application for login
18) List out a few JMeter Listeners?
Some of the JMeter Listeners are
19) What is distributed load testing? How can it be achieved?
Distributed load testing is the process through which numerous systems can be used for simulating a load of a large number of users. By using the master-slave configuration, JMeter can do distribute load testing.
20) 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 links in a web App.
21) Explain what is the role of Timer in JMeter?
With the help of a timer, JMeter can delay the time between each request, which a thread makes. It can solve the overload problem of the server.
22) Explain what is Post-processor?
To perform any action after making a request, Post-processor is used. For example, if JMeter sends an HTTP request to the web server, and if you want JMeter to stop sending the request if the webserver shows an error, then you will use post-processor to perform this action.
23) What are the benefits that JMeter offers for performance testing?
JMeter offers benefits on Performance Testing like
24). What is JMeter? What are the other applications that can be tested using JMeter?
Apache JMeter is open-source software. It is a 100% pure Java desktop application designed to load test functional behavior and measure the performance of the client/server applications.
25). Explain the basic workflow of JMeter?
JMeter acts like a group of users sending requests to a target server. It collects response from target server and other statistics which depict the performance of the application or server via graphs or tables.
26). Name the protocols supported by JMeter?
The following are some of the protocols supported by JMeter.
27). List the important features that JMeter supports?
The following are some of the key features of JMeter.
28). What is seen on the screen when you open a JMeter?
By default, the JMeter screen displays the Test Plan and Workbench tabs.
29) What is a Test Plan in JMeter? List some of the test plan elements available in JMeter.
A Test Plan defines and provides a layout of how and what to test. JMeter can be used to prepare a Test Plan for the web application as well as the client-server application. It behaves like a container for running tests.
A complete Test Plan comprises one or more of the following elements.
A Test Plan should have at least one thread group.
30). Explain the role of Workbench?
It is merely 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 :
These items aren’t available in the thread group and Test plan.
31). What is a Thread Group? List down its main parts?
Thread group elements are the beginning points of any Test Plan. It is mandatory to have at least one thread group in the Test Plan.
One should know the following about the Thread Group.
The following are the parts of a thread group.
32). What are JMeter controllers? Explain their types?
JMeter provides two types of Controllers.
33). What is a Configuration element? List down its elements.
The following are the key features of Configuration Element.
34. What are Listeners? List out a few JMeter Listeners.
It enables you to view the results of Samplers in the form of tables, graphs, trees, or simple text in some log files. It provides visual access to the data gathered by JMeter for the test cases executed for the Sampler component of JMeter.
JMeter supports the addition of Listeners anywhere in the tests that are included directly in the Test Plan. They will collect data only from elements at the same or lower level.
Some of the important JMeter Listeners are as follows.
35. 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.
36 Explain what is Post-processor?
Post-processors get used for calling an action after a request is made.
For example: suppose JMeter sends an HTTP request to the web server, and the user wants JMeter to stop sending the invitation. If the webserver shows an error, in this case, the user can use the post-processor to perform this action.
37. What is the execution order of Test Elements in the Test Plan of JMeter?
Following is the order of execution of the Test Plan elements.
38. Is it required to prepare a separate Test Plan using JMeter for the testing of the same application on different Operating Systems?
The following facts support that a JMeter Test Plan can run on any OS.
39. How do you ensure re-usability in your JMeter scripts?
Taking the following points into consideration we can encourage re-usability in the test scripts:
40. How can you reduce resource requirements in JMeter?
The following are the tricks that help in reducing resource usage.
jmeter -n -t test.jmx -l test.jtl
Also, you may like to read some of the common points.
41. List the benefits that JMeter offers for performance testing?
JMeter provides the following advantages for performance testing.
42. Explain what is Assertion in JMeter? List its types.
Assertion helps to verify that the server under test returns the expected results.
Some commonly used Assertion in JMeter are as follows.
43. What is Spike testing and how can we perform it in JMeter?
Suddenly increasing the number of users at a certain point of application and then monitoring its behavior at that interval is Spike testing.
In JMeter, Spike testing can be performed using Synchronizing Timer. This timer keeps on blocking the threads until a particular number of threads get reserved. It then releases them at once thus creating a large instantaneous load.
44. Explain the architecture of JMeter.
Jmeter is a Java-based open-source application that is basically designed for the purpose of Load Testing. It supports all major protocols that are supported in Load Runner. Unlike any browser, JMeter works on levels of protocols and does not execute JavaScript present in HTML web pages.
45. Does JMeter simulate actual browser behavior?
No, JMeter does not support the actual browser behavior. It does not render the HTML webpages as the normal browser does. The response can be viewed in HTML format but the actual timings are not present in the generated samples.
46. What is Distributed testing?
Distributed Testing means using multiple machines for load testing in which one of the machines can be made master and others can be kept as a slave. It is very important to note that all the machines should be on the same network and should have the same version of Java and JMeter.
47. What is the use of Regular Expression in JMeter?
Regular Expression is used to extracting some values dynamically from the responses. These values can be used in the subsequent request or can be saved for reporting purposes. Regular Expression is used in both Pre-Processors as well as Post Processors.
48. What are the types of processors in JMeter?
Basically, there are two types of processors in JMeter namely Pre-Processor and Post Processor. Pre-Processors execute before the main sampler and can change the scope of the sampler whereas Post Processors execute after the main sampler and are applicable to all samplers in the same scope of Test Plan. They can be used to extract some fields from the server response and store them in variables.
49. What are the different ways of Data Parameterization in JMeter?
Data Parametrization makes the scripts reusable where the values are not required to be hardcoded for the same request with different parameters.
Below is the data parametrization that is supported in JMeter :
50. What are the maximum recommended threads on a single system?
It depends on the hardware configuration of your system which includes a processor, JVM, allocated memory -Xmx, etc.
Other factors that impact thread count are the number of components in your test plan i.e. the number of config elements or processors and it also depends on whether you are using GUI/Non-GUI Mode.
51. Explain the difference between Gaussian and Poisson Timers.
Answer: Both Gaussian and Poisson Timers work on a mathematical formula with some constant delay and additional offset. Difference between the two lies in the fact that how the lambda value is calculated in the case of the Poisson timer and how deviation is calculated in the case of Gaussian Timer.
52. What are the major differences between JMeter and Load Runner?
JMeter is considered the major competitor of Load Runner in the industry. Enlisted are some of the major differences:
53. What is the use of co-relation in JMeter?
Co-relation is a process of extracting the values from the server response and storing it in a variable to be used in any other request which is to follow.
Example: for testing any login functionality if you have to use the session ID/cookie ID, you can extract the values from the response of getting Request of the login page and then dynamically use the same while making a POST request for a login.
54. Explain the flow of the Test Script Recorder.
HTTP(s) Test Script Recorder is used to record all the Http(s) requests going to the server from your application. Some configurations require to be done in JMeter in order to make it work.
Steps followed to record HTTPS traffic is :
55. Can JMeter record actions from mobile? If yes, how?
Yes, JMeter can record HTTP or Https requests going to the server from your mobile application also. It is required that mobile and JMeter are on the same network.
Below is the configuration required :
56. How to do a master-slave configuration in JMeter?
Master-slave configuration is a part of distributed testing in which more than one machine is used to perform load testing of the server under test.
It is very important that all machines are on the same network and all have the same version of JMeter. In distributed testing, one machine considered as the master, and the others are kept as slaves by doing some configurations.
The process is specified below :
57. What are the JMeter-supported protocols?
JMeter supports various standard protocols like:
58. Explain the syntax of JMeter variables and functions.
Just as in any other programming language, variables and functions are used in JMeter also in order to make the scripts reusable.
Syntax of Variable – ${var}
There are many inbuilt functions that are available in JMeter to perform various actions. Function string can be generated from the Function Dialogue Box itself.
Example: if you want to get the machine IP stored in a machine variable, you can use the string ${__machineIP(machine)}.
59. Why is it recommended to run JMeter in GUI mode?
JMeter tests can be run in both GUI as well as Non-GUI Mode. It is highly recommended to run the load test in Non-GUI mode because the AWT event thread can kill the tests in case of high load scenarios.
The various Non-GUI mode supported with JMeter are :
60. Is it possible to run selenium scripts in JMeter? If yes, how?
Yes, it is possible to run selenium scripts in JMeter to get some ideas on their performance.
There are two ways of doing it. Either you can use JUnit libraries to build selenium scripts and save as Jars and copy the same in the JMeter directory. And then add the JUnit sampler to your test plan and import the Jar file.
Otherwise, the Webdriver sampler plugin can be added in the JMeter ext folder. Restart the JMeter. Write your selenium code in the Webdriver sampler and then execute it to see the performance.
61. How do you manage sessions and cookies in JMeter?
Sessions and cookies can be managed in JMeter by using config elements such as HTTP Cache Manager which provides an option to clear the cookies in every iteration and also allows to add user-defined cookies.-
HTTP Cache manager helps you in clearing cache after each iteration as per your requirement in the load tests and also limits the number of elements that can be stored in the cache. Both of these config elements can be attached to the HTTP sampler.
62. Can JMeter measure the performance of a complete application? For Example, you have multiple screens in your mobile app. Can JMeter measure the time taken to flip the screens?
No, JMeter does not measure the transition time between the screens. It can only measure server actions, not UI interactions.
63. What is a Root CA certificate?
HTTPS connection requires a certificate to authenticate the connections which get established when the browser hits the webserver. JMeter generates it temporarily to intercept the SSL traffic in order to record the actions. For recording actions via mobile, you need to have this certificate on your mobile to record the actions.
64. Which factors decide the maximum threads that one should generate per system?
It depends on the hardware of the system.
Example: On a 2-3 GHz CPU, 400-600 threads can be generated. It also depends on the components in your test plan. More the processors and XML parsing elements, the more the CPU load and hence fewer threads. For high load, it is recommended to use multiple machines for load testing.
65. What is a Workbench and why is it required?
Workbench is a storage area for adding some components which can be added to the test plan if required.
Components of the workbench do not get saved with the test plan automatically. They have to be saved separately as test fragments. The most important part of the Workbench is HTTP(s) Test script recorder which is highly useful in recording the HTTPS request and later load can be applied to+9859 them to measure the response time.
66. What is Tidy Parsing?
Tidy Parsing is a type of parsing that is used in the Xpath extractor. If the response is in pure XML then tidy parsing is not required whereas, in the case of XHTML, it is mandatory to check the tidy parsing option in order to fetch the correct results.
67. What are the important plugins that are supported in JMeter?
JMeter supports different types of plugins which are helpful in generating high-quality results.
Below are the major plugins that are supported :