JMeter 的Non-Mode 命令模式
For non-interactive testing, you may choose to run JMeter without the GUI. To do so, use the following command options:
-n This specifies JMeter is to run in non-gui mode
-t [name of JMX file that contains the Test Plan].
-l [name of JTL file to log sample results to].
-j [name of JMeter run log file].
-r Run the test in the servers specified by the JMeter property "remote_hosts"
-R [list of remote servers] Run the test in the specified remote servers
以上,来自JMeter官方文档。
对于JMeter,运行java开发的GUI对于机器本身也是一种消耗,在Non-Mode命令模式下能更充分的使本地的配置运行测试脚本。
-n 启动JMeter的命令模式
-t 指定测试脚本
-l 生成jtl到指定的文件
-j 生成运行log
-r 运行指定的远程机器
-R 运行所有的远程机器jmeter -n -t demo2.jmx -l demo2.jtl -j demo2.log #运行demo2的测试脚本,生成jtl和log
又例如:jmeter -n -t demo2.jmx -R #启动所有的远程机器运行demo2脚本
参考:
http://jmeter.apache.org/usermanual/get-started.html#non_gui
例如:
本文链接:http://bigerhead.com/2015/09/169.html 转载请注明出处。