如何使用多个输出文件运行非gui Jmeter测试

时间:2015-11-08 13:44:23

标签: jmeter jmeter-plugins

如何在Jmeter中运行具有多个侦听器的非gui测试(PerfMon指标收集器和摘要报告)? 现在,适用于我的命令是一个输出文件: [path / to / installation] / jmeter -n -t test.jmx -l summaryResult.csv -j jmeter1.log> jmeter1.out

1 个答案:

答案 0 :(得分:1)

-l命令行选项"告诉" JMeter将结果存储在指定的文件中。您可以通过修改名称以jmeter.save.saveservice.

开头的JMeter属性来选择要存储的度量标准

默认值为:

jmeter.save.saveservice.output_format=csv
jmeter.save.saveservice.assertion_results_failure_message=false
jmeter.save.saveservice.assertion_results=none
jmeter.save.saveservice.data_type=true
jmeter.save.saveservice.label=true
jmeter.save.saveservice.response_code=true
jmeter.save.saveservice.response_data=false
jmeter.save.saveservice.response_data.on_error=false
jmeter.save.saveservice.response_message=true
jmeter.save.saveservice.successful=true
jmeter.save.saveservice.thread_name=true
jmeter.save.saveservice.time=true
jmeter.save.saveservice.subresults=true
jmeter.save.saveservice.assertions=true
jmeter.save.saveservice.latency=true
jmeter.save.saveservice.connect_time=false
jmeter.save.saveservice.samplerData=false
jmeter.save.saveservice.responseHeaders=false
jmeter.save.saveservice.requestHeaders=false
jmeter.save.saveservice.encoding=false
jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.url=false
jmeter.save.saveservice.filename=false
jmeter.save.saveservice.hostname=false
jmeter.save.saveservice.thread_counts=true
jmeter.save.saveservice.sample_count=false
jmeter.save.saveservice.idle_time=false
jmeter.save.saveservice.timestamp_format=ms
jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS
jmeter.save.saveservice.default_delimiter=,
jmeter.save.saveservice.default_delimiter=\t
jmeter.save.saveservice.print_field_names=false
jmeter.save.saveservice.xml_pi=<?xml-stylesheet type="text/xsl" href="../extras/jmeter-results-detail-report_21.xsl"?>
jmeter.save.saveservice.base_prefix=~/
jmeter.save.saveservice.autoflush=false

您可以修改值:

  • 将相关行添加到 user.properties 文件(它位于JMeter安装的/ bin文件夹中)
  • 通过-J命令行参数传递它们,如:

    [path/to/installation]/jmeter -Jjmeter.save.saveservice.output_format=xml -n -t test.jmx ...
    

通过这种方式,您可以控制在summaryResult.csv文件中存储的内容和方式。有关不同JMeter属性类型以及设置和覆盖它们的方法的详细信息,请参阅Apache JMeter Properties Customization Guide

如果您需要多个文件,还可以使用&#34;文件名&#34;输入以指定监听器输出应该去的位置和&#34;配置&#34;按钮,用于选择要存储的指标。

Summary Report