微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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)。通常这不是必需的。

原文地址:https://blog.csdn.net/weixin_48156889/article/details/119081923

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐