JMeter Distributed Testing

As a Systems Engineer at Tata Consultancy Services, I deliver exceptional software products for mobile and web platforms, using agile methodologies and robust quality maintenance. I am experienced in performance testing, automation testing, API testing, and manual testing, with various tools and technologies such as Jmeter, Azure LoadTest, Selenium, Java, OOPS, Maven, TestNG, and Postman.
I have successfully developed and executed detailed test plans, test cases, and scripts for Android and web applications, ensuring high-quality standards and user satisfaction. I have also demonstrated my proficiency in manual REST API testing with Postman, as well as in end-to-end performance and automation testing using Jmeter and selenium with Java, TestNG and Maven. Additionally, I have utilized Azure DevOps for bug tracking and issue management.
Why distributed testing is needed?
We do distributed testing to put a heavy load on the targeted server by sending a larger number of users from JMeter and it’s not suggested to use a single system to do the load testing with larger numbers of users because if we use a single system to put suppose 2500 users on the targeted server then we will not get a correct report of our test because initially, JMeter will run as expected but after some time due to limited local storage, CPU usage, RAM, heap memory, etc. the request will start failing and the response won’t be correct anymore.
To overcome all these issues, we use distributed testing, in which we connect multiple systems, the main system is known as the Master and all other systems are known as Slaves.
The Master computer is used to execute the test in the Slave and from multiple Slave computers we send the request to the targeted website. JMeter uses the RMI(Remote Method Invocation) to interact with the computers in the distributed network of Master-Slave configuration.
Master: The system which controls all the Slaves system.
Slave: The system which follows the commands of the Master System and sends the request to the targeted website.
Target: the website or server on which we want to put the load.

Prerequisite for Master-Slave configuration
JMeter version should be the same in Master and Slave.
Master and Slave should be connected to the same subnet.
Master and Slave system specifications should be the same as much as possible
Make sure that antivirus and firewall don’t block the server.
How to connect Master and Slave?
Steps to configure Slave systems.
Go to
binfolder of Apache JMeter from the drive.Open the
jmeter.propertiesfile in Notepad++.
Search for
server.rmi.ssl.disable=falseand change thefalsetotrueand uncomment it and save it.
Now again go to the JMeter
binfolder and double click onjmeter.server(window batch file) to start the server on the slave system.
Note down the IP address of the slave to add later in Master.

Steps to configure Master systems.
Go to
binfolder of Apache JMeter from the drive.Open the
jmeter.propertiesfile in Notepad++.Search
remote_hostsby default it shows the local IP address, change to the slave IP address, which we have copied earlier.
Now save the changes.
After doing all the configuration in Master and Slave, restart the JMeter in Master computer.
How to run the test in the Master-Slave configuration.
First, prepare your test plan as per the requirement in JMeter.

After that go to
Run->Remote Startclick on the IP address of your slave machine, which we have added while doing master-slave configuration.
Now check if the test has started or not in the Slave machine, it will display in the
cmd window, in which we have opened thejmeter.serverfile.
Once the test is finished we can check the listeners in Master to analyse it.
Conclusion
Distributed testing in JMeter is used to apply a larger number of user loads to the targeted website. We need a Master-Slave configuration for distributed testing. In the Master-Slave configuration, we connect multiple computers, where the computer that controls all the others is known as the Master, and the others are known as Slaves.
The Master-Slave configuration provides us with the correct report of distributed testing and assists us in simulating the real user experience under a heavy load. This helps us in ensuring the performance of the website.




