如何进行JMeter配置远程执行

如何进行JMeter配置远程执行,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

在对容器技术相关的各个组件进行压力测试时,我们选用JMeter作为压测工具,分别对docker daemon, convoy(a docker volume driver), contiv/netplugin (a docker net driver), swarm, etcd, OpenVSwitch, registry进行了压力测试。我们准备了几十台PM作为worker,为了便于本地修改JMeter测试用例后进行调测脚本等,需要对JMeter进行远程执行配置。本文主要记录该配置事项。

##Architecture 本文假设只配置一台Remote JMeter Instance(10.100.84.21) 如何进行JMeter配置远程执行

##Server Config

  • 编辑Server端JMeter的配置文件-jmeter.properties, 修改client.rmi.localport和server.rmi.localport如下:

  • # Parameter that controls the RMI port used by the RemoteSampleListenerImpl (The Controler) # Default value is 0 which means port is randomly assigned # You may need to open Firewall port on the Controller machine client.rmi.localport=7000

# To use a specific port for the JMeter server engine, define # the following property before starting the server: server.rmi.localport=60000

  • 编辑jmeter.properties, 修改Remote batching configuration中的mode为Standard: #--------------------------------------------------------------------------- # Remote batching configuration #--------------------------------------------------------------------------- mode=Standard

  • 保存后,执行./jmeter -s 启动jmeter server。

##Client Config:

  • 编辑jmeter.properties, 修改Remote hosts and RMI configuration中的remote_hosts和client.rmi.localport如下: #--------------------------------------------------------------------------- # Remote hosts and RMI configuration #--------------------------------------------------------------------------- # Remote Hosts - comma delimited remote_hosts=10.100.84.21 client.rmi.localport=7000

  • 编辑jmeter.properties, 修改Remote batching configuration中的mode为Standard: #--------------------------------------------------------------------------- # Remote batching configuration #--------------------------------------------------------------------------- mode=Standard

  • 保存后,执行./jmeter 启动带GUI的jmeter。

##执行测试计划 打开测试计划后,按照如下图所示方法即可远程执行该测试计划。 如何进行JMeter配置远程执行 PS:你也可以执行如下命令,通过命令行的方式执行远程执行测试计划,不带GUI。 jmeter -n -t script.jmx -r

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注行业资讯频道,感谢您对亿速云的支持。