Jmeter -使用文件名保存结果

ekqde3dh  于 2022-11-09  发布在  其他
关注(0)|答案(1)|浏览(206)

我需要将摘要结果附加到CSV文件中,我尝试了,但出现以下错误

2022-08-04 12:21:25,553 WARN o.a.j.s.CSVSaveService: Unknown column name 
2022-08-04 12:21:25,553 INFO o.a.j.s.CSVSaveService: C:\Users\Premkumar\Desktop\onescv.csv does not appear to have a valid header. Using default configuration.
2022-08-04 12:21:25,553 WARN o.a.j.s.CSVSaveService: Cannot parse timestamp: '', will try following formats [yyyy/MM/dd HH:mm:ss.SSS, yyyy/MM/dd HH:mm:ss, yyyy-MM-dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss, MM/dd/yy HH:mm:ss]
2022-08-04 12:21:25,553 INFO o.a.j.s.CSVSaveService:  did not match yyyy/MM/dd HH:mm:ss.SSS, trying next date format
2022-08-04 12:21:25,553 INFO o.a.j.s.CSVSaveService:  did not match yyyy/MM/dd HH:mm:ss, trying next date format
2022-08-04 12:21:25,553 INFO o.a.j.s.CSVSaveService:  did not match yyyy-MM-dd HH:mm:ss.SSS, trying next date format
2022-08-04 12:21:25,553 INFO o.a.j.s.CSVSaveService:  did not match yyyy-MM-dd HH:mm:ss, trying next date format
2022-08-04 12:21:25,553 INFO o.a.j.s.CSVSaveService:  did not match MM/dd/yy HH:mm:ss, trying next date format
2022-08-04 12:21:25,553 WARN o.a.j.s.CSVSaveService: Error parsing field 'timeStamp' at line 1. java.text.ParseException: No date-time format found matching

我已经尝试通过改变Jmeter属性中的日期格式,如下所示;


# Timestamp format - this only affects CSV output files

# legitimate values: none, ms, or a format suitable for SimpleDateFormat

# jmeter.save.saveservice.timestamp_format=ms

# jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS

如有任何建议,请enter code here

pftdvrlh

pftdvrlh1#

JMeter的.jtl files具有如下定义的格式:

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1659509834675,57,Your-Sampler-Label,200,OK,Thread Group 1-6,text,true,,114,0,12,12,null,25,0,3

在Summary Report侦听器中使用Save Table Data按钮时,前2行如下所示:

Label,# Samples,Average,Min,Max,Std. Dev.,Error %,Throughput,Received KB/sec,Sent KB/sec,Avg. Bytes
Your-Sampler-Label,42,282,53,490,132.23,0.000%,32.25806,3.59,0.00,114.0

JMeter正在查找Unix timestamp(如1659509834675),但它得到的是导致故障的Your-Sampler-Label
因此,在不中断监听器和HTML Reporting Dashboard生成的情况下,无法将摘要报告数据添加到.jtl结果文件中,如果您希望摘要报告监听器输出为CSV,则可以将JMeter Plugins Command Line Tool用作:

JMeterPluginsCMD.bat --generate-csv summary-report.csv --input-jtl /path/to/your/test/result.jtl --plugin-type SynthesisReport

这样,您就可以将摘要报告侦听器作为单独的文件。

相关问题