Jmeter Distributed (Remote) Testing: Master Slave Configuration

本文深入探讨了分布式测试的概念,它是利用多系统进行压力测试的一种方式,主要用于网站和服务器应用在面对多个客户端同时请求时的测试。文章详细介绍了分布式测试的客户机-服务器模型,包括主控系统、从属系统和目标服务器的角色,以及使用JMeter进行远程测试的具体步骤。此外,还讨论了分布式测试的限制条件,如所有服务器和客户端必须在同一子网内,以及目标服务器可能因过多请求而过载的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

What is Distributed Testing?

Distributed Testing is a kind of testing which use multiple systems to perform Stress Testing. Distributed testing is applied for testing websites and server applications when they are working with multiple clients simultaneously.

Distributes testing uses client-server model as the figure below:

How to perform Distributed Testing in JMeter

  • Master: the system running JMeter GUI, control each slave.
  • Slave: the system running JMeter-server, receive a command from the master and send a request to a server under test.
  • Target: the web server under test, get a request from slaves.

Remote Test Example

Precondition:

  • The firewalls on the systems are turned off. In some cases, the firewall may still be blocking the traffic. You should disable the Window firewall or Linux firewall.
  • All the machines should be on the same subnet. If machines are not on the same subnet, maybe they will not recognize each other in the network.
  • Use the same version of JMeter to avoid unanticipated errors/issues.

Here is the roadmap for this testing:

How to perform Distributed Testing in JMeter

Step 1) System configuration

Setup slave systems, go to jmeter/bin directory and execute file "jmeter-server.bat".

Assume that a slave machine has IP address: 192.168.0.10. On windows, you should see a window appear like the following figure:

How to perform Distributed Testing in JMeter

On the master systems, go to /bin directory and edit file jmeter.properites, add IP slave machine as below

How to perform Distributed Testing in JMeter

Step 2) Run the test

At this point, you are ready to start load testing. On the master machine, run JMeter GUI and open the test plan.

Click Run on the menu bar; select Remote start -> select the IP address of slave machine

How to perform Distributed Testing in JMeter

Step 3) Troubleshooting

If you are unable to run test form the above machine and see below error, simply ask an owner of a slave machine to run the JMeter-server.bat File.

How to perform Distributed Testing in JMeter

Disable Firewall on both master and slave machines to fix this error.

Limitation:

There are some basic limitations for distributed testing. Here's list of the known items:

  • Server and all clients must be on the same subnet.
  • Distributed testing required target server to have the large processing power. The target Server could be easily overloaded in case it gets too many requests by distributed JMeter tests.
  • A single JMeter can only handle a limited number of threads (100- 300 threads).
  • The distributed JMeter tests are complex, difficult for a beginner to build.

转载于:https://www.cnblogs.com/beiyue/p/9828791.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值