Friday, September 18, 2015

How to set up Distributed testing with JMeter



For the JMeter distributed testing, it has two parts:

Masterthe system running JMeter GUI, which controls the test
Slavethe system running JMeter-server, which takes commands from the GUI and send requests to the target system(s)

Master machine also called Client machine, Slave machine also called Server machine.We need to setup both Master and Slave machines to make them work for the distributed testing.


Pre_request:

  1.  Installl JMeter with the same version in all of the test machines, master and slave machines. 
  2. Don't forget install the JMeterPlugins in all of the test machines(master and slave), this is very important for your test plan with Stepping Thread Group or Ultimate Group
  3. If your test plane need to using mysql DB, you should need to install mysql-connector-java-5.1.18-bin.jar too.   
 Setup Slave Machines:
  1. Modify the server_port to some value that is not be used, like this:                                                                                                                                                                                                  

                 
  2. Modify the server.rmi.localport to some value that is not be used. Like this:         
                                       
  3. Save the modifications
  4. Now Open jmeter-server.bat in all of the slave machines. Looks like this                                               
  5. Now catch all of the slave machines'  IP address, such as 10.223.141.25.


Setup Master Machine:
  1. Open jmeter.properties file in a text editor. This file is located in Jmeter \bin folder, C:\apps\apache-jmeter-2.13\bin\jmeter.properties
  2. Edit the line “remote_hosts=127.0.0.1” add the IP address. For example, if I have jmeter server running on 10.223.141.25, 26, 27 and 28, the entry would like like this:
    remote_hosts=10.223.141.25:55501, 10.223.141.26:55501, 10.223.141.27:55501, 10.223.141.28: 55501    

                                                                                                                                       
  3. Please notice, at here 55501 should be the same as the server_port value that you just modified in the slave machines. this is the channel for master machine to talk with slave machines. 
  4. After save the modification, open jmeter.bat in the Client machine. The JMeter GUI is opened. 
  5. Create a new test plan or open an existing test plan in the GUI, and from the Run Tab, you can invoke remote Start or remote Start All to trigger some specific slave machine or all of the slave machines to run your test plane.


4 comments:

  1. The blog gave me idea to to set up Distributed testing with JMeter My sincere Thanks for sharing this post
    Software Testing Training in Chennai

    ReplyDelete
  2. This is very informative blog and useful article thank you for sharing with us keep posting. Selenium Training in Chennai | Software Testing Training in Chennai

    ReplyDelete
  3. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..


    Software Testing Training in Bangalore

    Software Testing Training in BTM Layout

    Software Testing Training in Marathahalli

    ReplyDelete
  4. The blog gave me idea to configure Junit with android My sincere Thanks for sharing this post and please continue share to Share this post


    Selenium Training in Chennai

    ReplyDelete