1.切到jmeter的bin目录
Microsoft Windows [版本 10.0.16299.194]
(c) 2017 Microsoft Corporation。保留所有权利。
C:\Users\lixxx>cd C:\apache-jmeter-4.0\bin
2.执行
jmeter.bat -n -t C:\apache-jmeter-4.0\bin\baidu.jmx -l C:\Users\liuxxxn\Desktop\output\logfile.jtl
-n
是指nongui,非界面模式
-t
后面是脚本的路径
-l
后面是压测生成的数据保存的路径,logfile.jtl不用创建,只要创建output这个文件夹即可,如果脚本被多次执行,那么再次执行脚本前,要删除已经存在的logfile.jtl文件
C:\Users\liuxxxan>cd C:\apache-jmeter-4.0\bin
C:\apache-jmeter-4.0\bin>jmeter.bat -n -t C:\apache-jmeter-4.0\bin\baidu.jmx -l C:\Users\lixxx\Desktop\output\logfile.jtl
May 08, 2019 5:39:48 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Creating summariser <summary>
Created the tree successfully usi