Jmeter命令行“保存表数据"在汇总报告中 [英] Jmeter command line to "save table data" in a aggregate report

查看:14
本文介绍了Jmeter命令行“保存表数据"在汇总报告中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用命令行保存由聚合报告生成的表数据,以便我可以自动化该过程.但是,我从 2004 年左右使用 2.2/2.3 jmeter 的旧帖子中读到这是无法完成的.但是现在是2014年,我们使用的是jmeter 2.11,我想知道我们是否可以保存表格数据.

红色框内的按钮是我想要做的,但使用命令行而不是 GUI.

谢谢

解决方案

为了实现这一点,您必须编写批处理脚本(windows)和 shell 脚本(Linux).
请按照以下步骤操作:

  • 通过命令行运行 Jmeter 并指定输出 *.jtl 文件的路径
  • 调用 Jmeter libext 目录中的 CMDRunner.jar 将 *.jtl 文件转换为聚合报告并另存为 CSV 文件.
<块引用>

  1. jmeter -n -t "C:Test.jmx" -l "C:output.jtl" ^&^&退出
  2. java -jar CMDRunner.jar --tool Reporter --generate-csv "C:Aggregate_Report.csv" --input-jtl "C:output.jtl" --plugin-type AggregateReport

  • 运行 *.bat 或 *.sh 文件

希望这会有所帮助.

I would like to save table data generated by an aggregate report using command line, so that I can automate the process. However, I read from an older post around 2004 using 2.2/2.3 jmeter that this cannot be done. But since it is 2014 now and we are using jmeter 2.11, I was wondering if we could save the table data.

The button boxed in red is what I am trying to do but with command line rather than with the GUI.

Thanks

解决方案

In order to achieve this you will have to write a batch script (windows) and shell script (Linux).
Please follow the below mentioned steps:

  • Run Jmeter via command line and specify path for output *.jtl file
  • Call CMDRunner.jar in your Jmeter libext directory to convert *.jtl file to Aggregate report and save as CSV file.

  1. jmeter -n -t "C:Test.jmx" -l "C:output.jtl" ^&^& exit
  2. java -jar CMDRunner.jar --tool Reporter --generate-csv "C:Aggregate_Report.csv" --input-jtl "C:output.jtl" --plugin-type AggregateReport

  • Run your *.bat or *.sh file

Hope this will help.

这篇关于Jmeter命令行“保存表数据"在汇总报告中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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