Tuesday 25 February 2014

How To Perform A Load Testing Though Apache Jmeter Testing

,
jmeter testing
Jmeter is one of the best software for load testing of Java based websites and web applications. Jmeter works on Master Slave pattern and performs testing on targets. Make sure that the firewalls are turned off. All the clients (slaves) must be on same subnet. You need to make sure that you have the IP address for you slaves like 192.x.x.x or 10.x.x.x. If the slaves do not uses 192.x or 10.x then you need not worry as your slaves does not require to be on same subnet masks then. There is one master controller which initiates the test on multiple slave systems.

You need to know some basic terminologies before you proceed with the steps required for load testing through Jmeter testing environment. You have the master, slave and the target. Master is the system that runs the Jmeter GUI that will be controlling the test. The Jmeter server runs on the slave terminals. It accepts the commands from the Jmeter GUI and then performs it on the target.  The target is the web server which is to be targeted for stress test.

On the slave systems, you need some modifications. Go to jmeter/bin directory. From here you can execute jmeter-server.bat. On windows the problem is a bit different. You need to go to the jre\[version]\bin\rmiregistry.exe”. If you do not find this then you need to check the environment settings as you might find multiple JRE installed on your system. Version denotes the JRE version that is installed on your server.

Open the jmeter-serber.bat by selecting a proper text editor installed on your computer. Now go to the line 44 and find the “.setCP” over there.  Now edit the “START rmiregistry” with the full path. As an example you can have “START C:\”<HOME>\jre\bin\rmiregistry.”

Also open the jmeter. Properties in that text editor and edit line with “remote hosts=127.0.0.1”. You need to add the IP address. You need to identify the jmeter servers. You need to identify all the IP addresses on the Jmeter server will be running. As an example you can have the IP address like 192.168.0.1, 2, 2, 4, 5, 6, and 7. For all this you can set the remote hosts as “remote_hosts=192.168.0.0, 192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4, 192.168.0.5, 192.168.0.6, 192.168.0.7.” Now start the jmeter. Finally open the test plan that you want to run. You can run the test plan on a single slave terminal or you can run it on the entire slave jmeter server once. You just need to select the testplan and right click. You will find the options for running on all servers or on one of them.  It is assumed that you have already added the number of test servers via thread numbers while you created the test plan.

Now you have also added the IP addresses on the Jmeter GUI on the master server. You just need to select the test plan and run with all or one server option for Jmeter testing.

You can finally get the results at the location that you have set for listener in test plan for Jmeter testing.

0 comments to “How To Perform A Load Testing Though Apache Jmeter Testing”

Post a Comment