As JMeter has some limitations for generating requests from one single machine, we go for distributed testing to overcome it. In distributed testing we configure a Master machine and certain number of slave machines (and the no of slaves depends upon the load/users) to simulate load with more numbers of users. The master machine controls the test and slaves do the actual job.
Let's consider 4 machines which are setup on cloud with 8GB RAM configuration. One will be termed as Master and other 3 will act as slave machines.
- Ensure that the 'system firewall' is turned off
- Download latest and same version of Apache JMeter along with the supported version of Java.
- Now open the jmeter.properties file of the master machine, and add remote_hosts=192.168.10.01,184.108.40.206,220.127.116.11 (IPs of slave machines) under Remote hosts and RMI configuration.
- Though there is no need to start RMI registry separately, but if you want to run the JMeter on specific port, you can define in jmeter. properties with following command: - server.rmi.localport=4000 (define the port)
- Now open jmeter-server.bat file in all the slave machines.
- In master machine, just open JMeter (jmeter.bat) in GUI and select the test plan which you want to run and click Run in the we can see 'Remote Start' (or) 'Remote Start All' (we can see the IP of three slaves which we given in jmeter.properties file).
- By selecting Remote Start All, all the slave systems will get started. We can see in jmeter-server.bat file of slave machines.
- We will get the test results in Master-JMeter GUI itself.
Now, steps to be done before starting the distributed testing through GUI: