新浪圍脖>@o蝸牛快跑o 企鵝交流羣>79642549
- 適用於Windows和linux執行機,與os無關
- 命令行容易擴展,比如上集成到jenkins平臺,用命令行更加容易
- 適用於高併發測試,測試開始時,console定期打印統計數據(默認30秒一次),減少cpu消耗,提高執行機併發能力
常用格式:jmeter_home/bin/jmeter -n -t testplan.jmx -l test.csv
summary + 是增量報告
summary = 是總量報告
看看下圖結果,這樣的數據統計在一些場景上,對結果數據分析有很大的幫助
官網原文如下:
2.4.4 Non-GUI Mode (Command Line 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
The script also lets you specify the optional firewall/proxy server information:
-H [proxy server hostname or ip address]
-P [proxy server port]
Example: 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.