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 request, FTP request, JDBC request and so on.
6) 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.
7) Mention what are the types of a processor in JMeter?
The types of a processor in JMeter are
- Post processor
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:
- HTTP URL re-writing modifier
- HTTP user parameter modifier
- HTML link parser
- BeanShell PreProcessor
9) Mention the execution order of Test Elements?
The test plans elements execution order is
- Configuration elements
10) 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 mean the regular expression matched the whole target. So, ‘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 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 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
15) 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, a test doesn’t use “view results tree” or “view results in table” listeners, use them only during the scripting phase
Don’t use functional mode
Instead of using lots of similar samplers, use the same sampler in a loop and use the variable to vary the sample
16) Name the common techniques for performance testing?
There are five testing techniques that are common in the present scenario. They are
These techniques measure the behavior of applications, their working conditions, handle apps with large records, and ensure functionality in case the overall number of users increases rapidly.
17) Explain Performance Testing?
The process of evaluating the performance of applications under greater load is known as Performance Testing. Basically, it’s nonfunctional testing and is generally done prior to categorizing the app on production. Actually, this ensures that the app will work fine under all the circumstances and don’t face issues like crashing during the real load. Performance monitoring is a very essential task.
18) Performance Testing needs a lot of activities to be performed. Name a few?
There are certain activities that are generally performed during this task and they are:
- Testing tool selection
- Performance test execution
- Performance test planning
- Analysis of test requirements
- Analysis of test results
- Script implementation
These activities are pretty common and can simply be performed.
19) What do you mean by the term Jmeter?
It is basically a Java-based tool that is meant to test the performance of apps. Its open-source nature makes it simply the best for this task. A number of testing related to the performance of the apps can simply be handled with this tool. It really doesn’t matter whether it’s web services or web-based apps. Moreover, it is capable to handle databases as well as FTP servers.
20) How requests are sent to the server in JMeter?
Basically, this is done with the help of Samplers. There are several samplers that are present in the JMeter and a few of them that are used commonly are:
- Junit request
- JDBC request
- HTTP request
21) What do you know about JMeter features?
Extensibility, portability as well as robustness are some of its key features. It is a Java-based approach, and thus it supports all applications based on the same. It is possible for the users to have a final outcome in graphical or tabular form. Test scripts can be created very fast and this is because of the playback feature that JMeter is equipped with. Also, a user needs not to worry about the protocols that can be tested through this tool.
22) Explain the Process of Parameterization?
Basically, it is a very simple process that parameterizes the different types of inputs. This is helpful in using the distinct values for the users.
23) What do you know about the correlation?
It is basically a process of enticing the data from the previous calls and then sending it to consecutive requests in the form of parameters. It is very helpful in making the scripting easy and the good this is it cut a lot of complexity from the process of handling sessions.
24) Tell something about configuration elements?
Customizing the requests that often come from samplers is an important task in JMeter. The same is performed with the help of configuration elements. They can also be used when it comes to integrating the sampler requests with the data obtained from the CSV file.
25) What exactly do you know about a Workbench in Jmeter?
Many times while handling the tasks in Jmeter, the need for storing the test elements is felt. Workbench stores them all on a temporary basis. In addition to the testing elements, there are certain nontest elements that are also present in it. There is a browser in this tool that helps in configuring these elements simply. Keeping anything on the Workbench doesn’t actually mean it is stored in the memory permanently.
26) Name an element in the JMeter that is powerful in representing a group of virtual users that are responsible for performing different operations.
The name of this element is Thread Group
27) Explain the Ramp-up period?
When it comes to testing the loading of an app, only a few users are considered then all for effectively studying the behavior of the app. This also derives a lot of useful information to know the overall performance of the app. Of course, it takes some time in making all the users in the running state. This time period is generally called the Ramp uptime. It is different from different apps depending on the overall number of users, data, and several other factors.
28) What are the benefits of using JMeter?
It is a very reliable told that always makes sure of error-free results. Its compatibility with all the apps makes it the best in performing its task. JMeter is an open-source tool and thus users need not worry about the cost. Learning and using this tool is not at all a big deal. In addition to this, customization of the JMeter tool to fit the exact needs is not at all a big deal. There are several tutorials and online communities to help that can help to eliminate any problem that declares its presence during the process.
29) What are the roles of Listeners in JMeter. Can you name a few of them?
Well, the prime role of listeners in the JMeter is to save the outcomes of tests after viewing the same. Basically, they are also very useful when it comes to graphical analysis as well as tabular analysis of the outcomes. A few of the commonly used Listeners are:
- Aggregate Graph
- View results tree
- Aggregate report
30) Name a few timers in JMeter. For what purpose they are considered?
Some of the common timers used in the JMeter are:
Uniform random timer
Gaussian random timer
Many times test gassing of a thread needs to be stopped for a specific time. Timers are used for the same purpose. They are capable to simply simulate the real user thinking time.
31) Why should we choose the JMeter tool for performance testing?
The advantages of using the JMeter tool for performance testing are-
- It is free to use with zero licensing costs.
- It is open-source. In other words, anyone can customize it for their specific use.
- There is good online community support and tutorials for JMeter.
- It supports performance testing of a wide variety of applications. For example – websites, web services to FTP, and Databases.
- It is easy to learn and use.
32) Explain the internal working of JMeter.
JMeter simulates real-world user load by creating multiple threads making concurrent requests to a target server. After that, it displays the performance of the server in the form of tables and graphs.
33) Does JMeter tool simulate a real browser?
No, JMeter does not simulate or function like a real browser. It cannot render HTML response like an actual browser.
34) What are some features of JMeter?
Some of the features of JMeter are-
JMeter is 100% Java-based. So, it has all the advantages of Java-based applications like portability, extensibility, robustness, etc.
It has a record and playback feature that ensures the easy and fast creation of test scripts.
JMeter provides different listeners to capture and analyze the test results in both tabular and graphical format.
It can be used to load test different protocols- HTTP, HTTPS, FTP, LDAP, TCP, etc.
35) How can we record performance test scripts in JMeter?
JMeter has HTTP(S) Test Script Recorder using which we can perform operations on a browser and the HTTP requests get recorder in JMeter.
36) Do we need to learn coding to create scripts in JMeter?
Script creation in JMeter is somewhat different from normal automated script creation. Mostly, a script can be created by recording or using JMeter UI. Followed by parameterization of tests, correlation, and configuration of different test parameters.
Having said that, coding is required in some scenarios and can be done with Beanshell scripting.
37) JMeter is Java-based. Can we use it to do performance testing of application implemented in other platforms/languages like .Net?
Yes, we can test web applications developed in other languages and platforms using JMeter.
38) What kind of applications can be tested using JMeter?
The different kinds of applications that can be tested using JMeter are-
- Web services – REST and SOAP
- Shell scripts
- SMTP, POP3, IMAP
39) Explain parameterization in JMeter?
Parameterization is the process of parameterizing the user input or other test inputs. So as to use different values for different users and loop iterations. For instance, an external CSV file can be created with multiple login credentials and then passed to the load test script in order to fetch different credentials for each iteration.
40) What is correlation?
Correlation is the most important aspect of scripting in JMeter. It includes fetching dynamic data from preceding requests/calls and passing them to the subsequent requests as parameters. For example, we can extract the values of session variables from the response of the request with login details and then pass those values to the subsequent requests (thus handling the sessions).
41) What is a Test Plan?
A Test plan in JMeter is a logical container that contains all the test elements which constitute the performance test. Some of the different elements in a test plan are – Thread Group, Samplers, Timers, Assertions, Listeners, etc.
42) What is Workbench?
A Workbench in JMeter is a temporary area of storage for the test elements. It also contains non-test elements like HTTP Proxy Server, which can be configured to record scripts via browser in JMeter. Any element placed in the workbench doesn’t get saved after with the test plan’s JMX script.
43) What is a thread group in JMeter?
A Thread Group is an element of a JMeter test plan that represents a pool of virtual users performing a set of operations.
44) What is a test fragment in JMeter?
A test fragment is a special type of controller in JMeter whose sole purpose is to provide code reusability capability in the test plan. It is like a Thread Group. But is not executed unless it is referenced by either a Module Controller or an Include_Controller.
45) What is the ramp-up period?
At the beginning of the load test of an application instead of putting all the users live, we slowly ramp up the number of users in order to study their effect in the application’s performance. In JMeter, the ramp-up period defines the time period within which all the specified users get in running state.
46) What are samplers in JMeter?
Samplers in JMeter are used for sending different types of requests to the server. Some of the commonly used samplers are – HTTP Request, JDBC Request, SOAP-XML Request, JUnit request, TCP Sampler, etc.
47) What are Listeners in JMeter? State some of the widely used Listeners?
Listeners are used for viewing, saving test results and also help in tabular and graphical analysis of the test results. Some of the widely used Listeners are – Aggregate Report, Aggregate Graph, Graph Results, View Results Tree, etc.
48) What is a JTL file in JMeter?
The test results in JMeter is saved in the form of JTL files. JTL is an acronym for JMeter Test Logs.
49) What are the different timers in JMeter?
Timers are used for halting the test execution of a thread for a certain predefined time. In addition, these timers are used for simulating the real user think time. The different types of timers available in JMeter are – Constant Timer, Gaussian Random Timer, Uniform Random Timer, Constant Throughput Timer, Synchronizing Timer, Beanshell timer, BSF Timer, etc.
50) What is the difference between the Gaussian random timer vs Poisson random timer?
Both Gaussian and Poisson random timers are used to pause the test execution for a random amount of time but close a specific value. The difference between the two lies in their underlying implementation algorithms to generate the random values.
51) What is a Rendezvous Point?
The Rendezvous point in JMeter is used to perform spike testing. It is performed using “Synchronizing Timer” by waiting until the number of active users reaches a certain specified value during the load test.
- Checklist of Disaster Recovery Plan in Kubernetes (EKS) for GitLab - February 24, 2023
- Kubernetes: Pull an Image from a Private Registry using Yaml and Helm File - February 24, 2023
- Jenkins Pipeline code for Sending an email on Build Failure - February 24, 2023