Following is the set of JMeter Interview Questions #5.
Q. 21 How to reduce the memory requirement for execution using JMeter?
Ans: In order to reduce the memory requirements following are the steps:
- Use non-GUI mode for test execution using below command:
jmeter –n –t test.jmx –l test.jtl
- Do not use listeners or disable them before starting the test.
- Don’t use functional mode.
- Try to implement scripting logic using available element only
- Try to avoid the code (you can use only in that case when the specific JMeter element is not available)
- Write the custom code in Groovy instead of BeanShell.
- Use CSV output rather than XML.
- Save the data which you really need.
- Use as few assertions as possible.
Q. 22 How do you record the script using Test Script Recorder?
Ans: Below are the steps:
- Add HTTP(s) Test Script Recorder
- Enter the port number
- Enter the host URL
- Add a Recording Controller in the test plan and select the same as Target so that all the recordings are stored under it.
- Configure the browser with manual proxy settings pointing to the same port number used in the test script recorder
- Click “Start” button in HTTP(s) Test Script Recorder
Q. 23 What is distributed load testing?
Ans: The generation of a huge volume of user load is not possible using the same machine. The solution is either to increase the resources of the machine or use a distributed structure. The distributed load testing is the process through which numerous systems can be used for simulating a load of a large number of users and those systems act as load generators.
Q. 24 What is the physical structure of distributed load testing?
Ans: Master-Slave. By using the master-slave configuration, JMeter can do distribute load testing.
Q. 25 How to do master-slave configuration in JMeter?
Ans: 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 below configurations:
- On master machine, edit the jmeter.properties file and add the IP addresses of slave machines against the remote_host field in the file.
- Save the file and open the JMeter again.
- Now from the Run menu in JMeter, select Remote Start and choose the IP of the machine to be invoked.
- Choose the Run menu and select Remote Start all to start all the slave machines for your testing.
You may be interested: