Home > Programming, QA, Test and Automation Stuffs > JMeter Distributed Testing Step-by-step

JMeter Distributed Testing Step-by-step

Hi guys, I found this tutorial about Jmeter distributing testing in different PCS. This short tutorial explains how to use multiple systems to perform stress testing. Before we start, there are a couple of things to check.

  1. the firewalls on the systems are turned off.
  2. all the clients are on the same subnet.
  3. the server is in the same subnet, if 192.x.x.x or 10.x.x.x ip addresses are used. If the server doesn’t use 192 or 10 ip address, there shouldn’t be any problems.
  4. Make sure JMeter can access the server.
  5. Make sure you use the same version of JMeter on all the systems. Mixing versions may not work correctly.

Once you’ve made sure the systems are ready, it’s time to setup remote testing. The tutorial assumes you already have JMeter installed on all the systems. The way JMeter works is 1 master controller initiates the test on multiple slave systems.

1

Terminology
Before we dive into the step-by-step instructions, it’s a good idea to define the terms and make sure the definition is clear.
Master – the system running Jmeter GUI, which controls the test
Slave – the system running jmeter-server, which takes commands from the GUI and send requests to the target system(s)
Target – the webserver we plan to stress test
2
Step-by-Step

  1. On the slave systems, go to jmeter/bin directory and execute jmeter-server.bat (jmeter-server on unix). On windows, you should see a dos window appear with “jre\[version]\bin\rmiregistry.exe”. If this doesn’t happen, it means either the environment settings are not right, or there are multiple JRE installed on the system. Note: [version] would be the jre version installed on the system.
  2. Open jmeter-server.bat in a text editor
  3. go to line 44 and find “:setCP”
  4. edit “START rmiregistry” to the full path. Example: “START C:\<JAVA_HOME>\jre\bin\rmiregistry”
  5. On master system acting as the console, open windows explorer and go to jmeter/bin directory
  6. open jmeter.properties in a text editor
  7. edit the line “remote_hosts=127.0.0.1”
  8. add the IP address. For example, if I have jmeter server running on 192.168.0.10, 11, 12, 13, and 14, the entry would like like this: remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12,192.168.0.13,192.168.0.14
  9. Start jmeter.
  10. Open the test plan you want to use
3
Starting the Test
At this point, you are ready to start load testing. If you want to double check the slave systems are working, open jmeter.log in notepad. You should see the following in the log.
Jmeter.engine.Remote
JMeterEngineImpl:
Starting backing engine
If you do not see this message, it means jmeter-server did not start correctly. For tips on debugging the issue, go to the tips section. There are two ways to initiate the test: a single system and all systems.
Start a single clients
4
  1. click Run at the top
  2. select Remote start
  3. select the IP address

 

Start all clients

5
  1. click Run at the top
  2. select Remote start all or use CRTL-Z

 

Limitations

There are some basic limitations for distributed testing. Here’s the list of the known items in no specific order.

  1. RMI cannot communicate across subnets without a proxy; therefore neither can jmeter without a proxy.
  2. Since JMeter sends all the test results to the controlling console, it is easy to saturate the network IO. It is a good idea to use the simple data writer to save the results and view the file later with one of the graph listeners.
  3. Unless the server is a large multi processor system, in most cases

 

Tips

In some cases, the firewall may still be blocking RMI traffic. Symantec Anti Virus and Firewall. In some cases, Symantec firewall needs to be stopped from windows services.

  1. open control panel
  2. open administrative tools
  3. double click services
  4. Go to down to symantec anti virus, right click and select stop

Windows firewall

  1. open network connections
  2. select the network connection
  3. right click and select properties
  4. select advanced tab
  5. uncheck internet connection firewall

Linux

On Suse linux, ipchains is turned on by default. For instructions, please refer to the “remote testing” in the user manual.

On RedHat (or derivatives), iptables (netfilter) is turned on by default. Execute “service iptables stop” to stop the Linux netfilter firewall.

 

Fonts: http://wiki.apache.org/jmeter/JMeterFAQ#How_to_do_remote_testing_the_.27proper_way.27.3F

http://jmeter.apache.org/usermanual/remote-test.html

http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf

Advertisements
  1. August 22, 2015 at 7:57 pm

    We aгe ɑ bunch of volunteers ɑnd opening a new scheme іn our community.
    Yoսr website offered uѕ wіth valuablee info to
    woгk on. You’vе Ԁone ɑ formidable process ɑnd our entire community might
    be thankful to you.

  2. August 23, 2015 at 12:05 am

    Your style is reallү unique compared tо other folks
    Ӏ’ve read stuff frοm. Tɦanks for posting ѡhen yoս’vе got tɦе opportunity,
    Guess І’ll јust book mark tɦis ρage.

  3. August 24, 2015 at 5:11 am

    Hi therе friends, іts enormous article on tҺe topic of tutoringand ϲompletely defined, keep іt
    up all the time.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: