1、jmeter 静默压测
静默:脱离UI运行Jmeter压测
好处:命令行运行更容易“搞事情”
命令格式:jmeter -n -t $jmx_file -l $jtl_file
jmx Jmeter压测程序脚本文件,压测控制过程记录在jmx文件中
jtl 文件是Jmeter压测请求响应数据的原始文件。
2、自动化生成web版压测报告
实施静默压测后,通过命令直接生成对应的html压测报告
过程:jtl原始数据 -> html压测报告
好处:快捷、省事、节约时间
命令格式:
jmeter -g $jtl_file -o $web_report_folder
可以与静默模式压测命令整合
jmeter -n -t $jmx_file -l $jtl_file -o $web_report_folder
demo实例地址:
https://github.com/princeqjzh/meican