For this, you need to have one JMeter master and few JMeter agents.JMeter master is a JMeter instance which is used to direct the JMeter script to run them on agent instances.JMeter agents are also JMeter instances which are used to run JMeter scripts that direct from master.Look at the below diagram for more information.
To do above follow the below steps
- Start JMeter in one machine and create a test plan and save.Will call this the master
- Then go to \apache-jmeter-3.2\bin and get the jmeter.properties file.
- Open this using a notepad and go to “Remote hosts and RMI configuration” section and add “remote_hosts=10.1.55.140,10.1.2.5” line there.Comment other remote hosts(ex: localhost).These remote hosts are the IP addresses of machines which the JMeter agents are running.
- Now save the jmeter.properties and re-start JMeter to effect the change.
- In agent machines, open Jmeter downloaded folder, go to bin and run “jmeter-server.bat” file.
- Finally, go to JMeter master and run “Remote start all” under run menu.If you want to run the script in only one agent, choose Run -> Remote Start -><IP of the agent machine>.
Below image display the information in command window of JMeter agent side, when master run the script on an agent machine.