• Slider Banner

    Prepare for

    Technical Interview

    Over 1 Million+ Interview Questions for different profiles

    Read More
  • Slider Banner

    Join the

    Programming World

    Learn about top programming languages, tools and frameworks.

    Read More
  • Slider Banner

    Prepare with

    Certification MCQ

    Practice for certification from 1000+ multiple choice questions.

    Read More

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.

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 JUnit sampler to your test plan and import the Jar file.

Otherwise, WebDriver sampler plugin can be added in the JMeter ext folder and then restart the JMeter. Write your selenium code in the WebDriver sampler and then execute to see the performance.

Why is it recommended to run JMeter in GUI mode?

JMeter tests can be run both GUI as well as Non-GUI Mode.

It is highly recommended to run the load test in Non-GUI mode because AWT Event Thread can kill the tests in case of high load scenarios.

There are various Non-GUI mode supported with Jmeter such as:

  • Command Line
  • ANT Plugin
  • MAVEN Plugin
  • Jenkins

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.

For example, if you want to get the machine IP stored in a machineIP variable, you can use the string.


How to do 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 is made as the Master and the others are kept as slaves by doing some configurations.

The process is specified below:

Can JMeter record actions from Mobile? If yes, how?

Yes, JMeter can record HTTP or https request going to the server from your mobile application also. Mobile and JMeter should be on the same network.

Below is the configuration required:

  • Configure your proxy server in JMeter to run at a specified port.
  • Set up a proxy on your mobile wifi settings and enter the same port number that is used in the recorder.
  • Install the Root CA certificate on your mobile.
  • Hit server request from your mobile and observe it getting captured by the specified controller.

What is the use of co-relation in JMeter?

Co-relation is a process in which values can be extracted from the server response and stored in a variable and then can be used in any other request which is to follow.

For Example, for testing any login functionality if you have to use session ID/cookie ID, you can extract the value from the response of GET request of the login page and then dynamically use the same while making POST request for login.

Explain the difference between Gaussian and Poisson Timers in JMeter.

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 how the lambda value is calculated in case of Poisson timer and how deviation is calculated in case of Gaussian Timer.

Subscribe to