Recently encountered in the project batch conversion JMeter test Results JTL problem, complete a script, recorded as follows:
#bin/SHfilelist=`lsJTL ' # reads and stores all file lists of the JTL directory into variables for file inch$filelist #遍历处理各个文件 Do#文件名形如 Test2ad.jtl, get the position of the. Character Index=`ExprIndex $file.`
#. Character Fu Xiangmai one for valid characters index= $index-1
#截取test2ad. JTL in TEST2AD CSV variable csv=${file:0: $index}
Absolute path to #指定JMeterPluginsCMD. Sh and jtl files java_jmeter/lib/ext/Jmeterpluginscmd.SH--generate-csv jieguo/csv/$csv/transactionspersecond.csv--input-jtl jieguo/$file--granulation +--plugin-type Transactionspersecond java_jmeter/lib/ext/Jmeterpluginscmd.SH--generate-csv jieguo/csv/$csv/responsetimesovertime.csv--input-jtl jieguo/$file--granulation +--plugin-type Responsetimesovertime java_jmeter/lib/ext/Jmeterpluginscmd.SH--generate-png jieguo/csv/$csv/transactionspersecond.png--input-jtl jieguo/$file--granulation +--plugin-type TransactionspersecondJava_jmeter/lib/ext/jmeterpluginscmd.SH--generate-png jieguo/csv/$csv/responsetimesovertime.png--input-jtl jieguo/$file--granulation +--plugin-type Responsetimesovertime Done
A shell that converts JTL files in bulk