如何使用命令提示符将JMeter聚合报告结果保存到CSV文件? [英] How to save JMeter Aggregate Report results to a CSV file using command prompt?

查看:6526
本文介绍了如何使用命令提示符将JMeter聚合报告结果保存到CSV文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用JMeter在GUI模式下组合负载测试我的服务所需的所有测试用例,但对于实际测试,我需要在非GUI模式下执行测试。
如何使用命令提示符在csv文件中保存Aggregate报告的结果。



提前感谢。

解决方案

作为替代方案:您可以直接从聚合报告侦听器。



1。 为结果文件设置文件名/模板:

  resultsFile = $ {__ property(user.dir)} $ {__ BeanShell (File.separator,)} result _ $ {__ time(yyyyMMdd-HHmmss)}。csv 

2。配置Aggregate Report侦听器,如下所示:





在这种情况下生成的CSV文件将不同于通过GUI /保存表数据生成的文件。




如果不能接受,最好使用前面回答中的JMeterPluginsCMD方法:

  java -jar JMeterPluginsCMD.jar --generate-csv aggregateResults.csv --input-jtl testResults.jtl --plugin-type AggregateReport 
pre>

I have been using JMeter in GUI mode for composing all the test cases required for load testing my service but for actual testing I need to execute tests in non-GUI mode. How do I save the results of Aggregate report in csv file using command-prompt.

Thanks in advance.

解决方案

Just as alternative: you may do this directly from the Aggregate Report listener.

1. set filename/template for results file:

resultsFile = ${__property(user.dir)}${__BeanShell(File.separator,)}result_${__time(yyyyMMdd-HHmmss)}.csv

2. configure Aggregate Report listener as shown below:

CSV-file generated in this case will differ from generated via GUI/"Save Table Data" one.

If it is not acceptable you'll better use method with JMeterPluginsCMD from previous answer:

java -jar JMeterPluginsCMD.jar --generate-csv aggregateResults.csv --input-jtl testResults.jtl --plugin-type AggregateReport

这篇关于如何使用命令提示符将JMeter聚合报告结果保存到CSV文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆