CLI Mode (Command Line mode was called NON GUI mode),JMeter的CLI模式解析20210725

JMeter的CLI Mode解析

https://jmeter.apache.org/usermanual/get-started.html

For load testing, you must run JMeter in this mode (Without the GUI) to get the optimal results from it. To do so, use the following command options:

-n
This specifies JMeter is to run in cli 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
-g
[path to CSV file] generate report dashboard only
-e
generate report dashboard after load test
-o
output folder where to generate the report dashboard after load test. Folder must not exist or be empty
The script also lets you specify the optional firewall/proxy server information:

-H
[proxy server hostname or ip address]
-P
[proxy server port]

jmeter -n -t my_test.jmx -l log.jtl -H my.proxy.server -P 8000

If the property jmeterengine.stopfail.system.exit is set to true (default is false), then JMeter will invoke System.exit(1) if it cannot stop all threads. normally this is not necessary

中文版:
1.4.4 CLI 模式(命令行模式被称为 NON GUI 模式)
对于负载测试,您必须在此模式下(不带 GUI)运行 JMeter 以从中获得最佳结果。为此,请使用以下命令选项:

-n
这指定 JMeter 以 cli 模式运行
-t
[包含测试计划的 JMX 文件名称]。
-l
[将样本结果记录到的 JTL 文件名称]。
-j
[JMeter 运行日志文件名称]。
-r
在 JMeter 属性“ remote_hosts ”指定的服务器中运行测试
-R
[远程服务器列表] 在指定的远程服务器上运行测试
-G
[CSV 文件的路径] 仅生成报告仪表板
-e
负载测试后生成报告仪表板
-o
负载测试后生成报告仪表板的输出文件夹。文件夹不得存在或为空
该脚本还允许您指定可选的防火墙/代理服务器信息:

-H
[代理服务器主机名或 IP 地址]
-P
[代理服务器端口]
例子
jmeter -n -t my_test.jmx -l log.jtl -H my.proxy.server -P 8000
如果属性jmeterengine.stopfail.system.exit设置为true(认为false),则 JMeter 将在无法停止所有线程时调用System.exit(1)。通常这不是必需的。

相关文章

Jmeter:Authenticationcredentialswerenotprovided上次在使...
初次使用jmeter时,结果树中返回的数据为未转码内容,如下:...
jmeter默认语言设置: 1、临时设置:进入options--ChooseLa...
第一步:打开jmeter工具。 第二步:点击鼠标右击,点击添加...
在之前的博文中,Jmeter二次开发——基于Java请求,已介绍了...
打开虚拟机然后用远程连接工具SSH连接到数据库将serveragent...