jmeter基准测试脚本
@echo off
chcp 936
rem jmeter路径
set jMeterDir=D:\Program File\apache-jmeter-5.4.1\bin
echo jMeterDir:%jMeterDir%
set jMeter=%jMeterDir%\jmeter
rem 根据日期生成每天的记录
set dateDir=%date:~0,4%%date:~5,2%%date:~8,2%
set dayDir=.\%dateDir%
rem 不存在目录则创建
if not exist %dayDir% mkdir %dayDir%
set baseDir=%dayDir%\
set jtlDir=%baseDir%%dateDir%.jtl
rem 调用测试配置
call "%jMeter%" -n -t .\library.jmx -l %jtlDir%
set htmlDir=%baseDir%html
if not exist %htmlDir% mkdir %htmlDir%
echo "%jMeter%"
echo "%jtlDir%"
echo "%htmlDir%"
rem 生成html
call "%jMeter%" -g "%jtlDir%" -o %htmlDir%
echo "success"
留待后查,同时方便他人
联系我:renhanlinbsl@163.com
联系我:renhanlinbsl@163.com