SimpleDao
jmeter压测工具使用
2019-05-06, 访问数: 876

安装

在官网下载压缩包,解压后进入文件夹即可

配置jmx

先在windows下执行 bin/jmeter.bat,
在图形界面下配置好参数,然后保存配置jmx文件

在linux上执行

  1. # 启动执行server
  2. bin/jmeter-server
  3. # 执行压测任务
  4. bin/jmeter -n -t metrics_interface/dcs.jmx -l report/metrics_interface.jtl.alpha -R127.0.0.1

参数说明

  1. -n This specifies JMeter is to run in non-gui mode
  2. -t [name of JMX file that contains the Test Plan].
  3. -l [name of JTL file to log sample results to].
  4. -j [name of JMeter run log file].
  5. -r Run the test in the servers specified by the JMeter property "remote_hosts"
  6. -R [list of remote servers] Run the test in the specified remote servers
  7. -g [path to CSV file] generate report dashboard only
  8. -e generate report dashboard after load test
  9. -o output folder where to generate the report dashboard after load test. Folder must not exist or be empty
  10. The script also lets you specify the optional firewall/proxy server information:
  11. -H [proxy server hostname or ip address]
  12. -P [proxy server port]