In this article we are going to see how to distribute test in JMeter. Basically what we do, we will distribute out single test plan to run in distributed way.
First, We have to know how JMeter works in single PC. JMeter creates an agent to a PC and the agent executes test which we have prepared. So, What will be done in the distributions? In the distributed way, jmeter will run the same test plan from different pc where the control will be on one. That means, 1 Master but several servers(or remote).
Step 1 : Prepare a test plan
We have to make a test plan to test. You can you any plan to do that, I have use an example from previous post.
Step 2 : Prepare the System to Test
a. Prepare Server (Remote hosts)
-Go to JMeter installed folder , /bin directory and execute jmeter-server.bat
[Note: if we don't see cmd prompt, we have to show the path of JRE path manually in jmeter-server.bat, to do that, open this jmeter-server.bat by text editor and find :setCP,
edit “START rmiregistry” to the full path.(Ex: “START C:\\jre\bin\rmiregistry”)
b. Prepare Master
-Open jmeter.properties in a text editor
-Edit line “remote_hosts=127.0.0.1”(Ex-remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12)
-start jmeter.bat
-Open the test plan that we have saved
Note :
-All Server and Master should be in same sub net mask(same network)
Step 3 : Run The Test
-Check Server
If we want to check the slave systems that are working, open jmeter.log in notepad and we can see this entry.
Jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine
- Running in a Single Server
Click Run-> Remote Start -> IP(select destination server IP)
- Running all servers
Click Run-> Remote Start All
See the screenshots for more options.
Notes :
1. Run All same version of jmeter in server and master pc.
2. RMI can't Run without proxy server, so we need a proxy server to use centrally.(I will provide a different test plant for better understanding later on)
3. As JMete works with large data over network, it is better not to have so many listeners, but we need simple logger to view results after finishing the test process.
4. If we execute using 2/3 server, the Master will be very busy on collection data. We might need a high configured Master to solve the problem. So, for a small solutions, it is better not to use distribute testing.
5. For, configuration estimation(from jmeter site), a 2.3Ghz CPU can take 300-600 threads(depends on test type )except for XML pursing test(such as web service test). XML purse test will be 4-10 time slower than normal steps.
6. Stop All antiviruses (it stops high resource using)[I am using windows]
7. Stop internet connection Firewall [I am using windows]
So , that is a small demonstration for a distributed test execution in Jmeter. We need when we are testing a large amount of load.
...Thanks..:)
First, We have to know how JMeter works in single PC. JMeter creates an agent to a PC and the agent executes test which we have prepared. So, What will be done in the distributions? In the distributed way, jmeter will run the same test plan from different pc where the control will be on one. That means, 1 Master but several servers(or remote).
Step 1 : Prepare a test plan
We have to make a test plan to test. You can you any plan to do that, I have use an example from previous post.
Step 2 : Prepare the System to Test
a. Prepare Server (Remote hosts)
-Go to JMeter installed folder , /bin directory and execute jmeter-server.bat
[Note: if we don't see cmd prompt, we have to show the path of JRE path manually in jmeter-server.bat, to do that, open this jmeter-server.bat by text editor and find :setCP,
edit “START rmiregistry” to the full path.(Ex: “START C:\
b. Prepare Master
-Open jmeter.properties in a text editor
-Edit line “remote_hosts=127.0.0.1”(Ex-remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12)
-start jmeter.bat
-Open the test plan that we have saved
Note :
-All Server and Master should be in same sub net mask(same network)
Step 3 : Run The Test
-Check Server
If we want to check the slave systems that are working, open jmeter.log in notepad and we can see this entry.
Jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine
- Running in a Single Server
Click Run-> Remote Start -> IP(select destination server IP)
- Running all servers
Click Run-> Remote Start All
See the screenshots for more options.
Notes :
1. Run All same version of jmeter in server and master pc.
2. RMI can't Run without proxy server, so we need a proxy server to use centrally.(I will provide a different test plant for better understanding later on)
3. As JMete works with large data over network, it is better not to have so many listeners, but we need simple logger to view results after finishing the test process.
4. If we execute using 2/3 server, the Master will be very busy on collection data. We might need a high configured Master to solve the problem. So, for a small solutions, it is better not to use distribute testing.
5. For, configuration estimation(from jmeter site), a 2.3Ghz CPU can take 300-600 threads(depends on test type )except for XML pursing test(such as web service test). XML purse test will be 4-10 time slower than normal steps.
6. Stop All antiviruses (it stops high resource using)[I am using windows]
7. Stop internet connection Firewall [I am using windows]
So , that is a small demonstration for a distributed test execution in Jmeter. We need when we are testing a large amount of load.
...Thanks..:)