无法创建(预期列数之间不匹配)Jmeter中的仪表板报告......!

时间:2017-11-08 21:19:56

标签: jmeter performance-testing jmeter-3.2

我在Jmeter中生成仪表板报告时遇到问题(通过命令行) 1)Coped reportgenerator属性到用户属性文件 2)重新启动Jmeter以获取数据 3)在下面添加到用户属性文件:

jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.label=true
jmeter.save.saveservice.latency=true
jmeter.save.saveservice.response_code=true
jmeter.save.saveservice.response_message=true
jmeter.save.saveservice.successful=true
jmeter.save.saveservice.thread_counts=true
jmeter.save.saveservice.thread_name=true
jmeter.save.saveservice.time=true
jmeter.save.saveservice.timestamp_format=ms
jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss

我觉得主要问题是与我的CSV文件/ JTL文件不匹配并尝试创建报告。 - 给我你的建议

错误|发生错误: org.apache.jmeter.report.dashboard.GenerationException:处理样本时出错:预期列数之间不匹配:16和CSV文件中的列:6,检查你的jmeter.save.saveservice。*配置         在org.apache.jmeter.report.dashboard.ReportGe enter code here nerator.generate(ReportGenerator.java:246)         在org.apache.jmeter.JMeter.start(JMeter.java:517)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)         at java.lang.reflect.Method.invoke(Unknown Source)         在org.apache.jmeter.NewDriver.main(NewDriver.java:248) 引起:org.apache.jmeter.report.core.SampleException:预期列数之间不匹配:16和CSV文件中的列:6,检查

jmeter.save.saveservice.* configuration
        at org.apache.jmeter.report.core.CsvSampleReader.nextSample(CsvSampleReader.java:183)
        at org.apache.jmeter.report.core.CsvSampleReader.readSample(CsvSampleReader.java:201)
        at org.apache.jmeter.report.processor.CsvFileSampleSource.produce(CsvFileSampleSource.java:180)
        at org.apache.jmeter.report.processor.CsvFileSampleSource.run(CsvFileSampleSource.java:238)
        at org.apache.jmeter.report.dashboard.ReportGenerator.generate(ReportGenerator.java:244)
        ... 6 more
An error occurred: Error while processing samples:Mismatch between expected number of columns:16 and columns in CSV file:6, check your jmeter.save.saveservice.* configuration
errorlevel=1

2 个答案:

答案 0 :(得分:0)

我犯了同样的错误。只需忘记这些属性并复制到user.properties文件 only this

  

jmeter.reportgenerator.overall_granularity = 60000   jmeter.reportgenerator.apdex_statisfied_threshold = 1500   jmeter.reportgenerator.apdex_tolerated_threshold = 3000   jmeter.reportgenerator.exporter.html.series_filter =((^ S0)|(^ S1))( - 成功| -failure)?   jmeter.reportgenerator.exporter.html.filters_only_sample_series =真

然后从命令行运行:

.\jmeter -n -t sample_jmeter_test.jmx -l test.csv -e -o tmp

其中:

.\jmeter - you run the jmeter in \bin directory

sample_jmeter_test.jmx - name of the test that will be run, located in \bin directory

test.csv - located again in the \bin directory, this is the file that all gathered statistics will be written into

tmp is the directory where I create under \bin where the dashboard files will be saved

答案 1 :(得分:0)

文件 csv 或 jtl 可能仍在写入中,因此 jmeter 进程报告尝试读取文件,同时将另一个字段和行添加到同一文件中。事实上,我通过在同一个 jtl 文件上手动运行报告生成命令来解决错误:

jmeter -g <file csv or jtl> -o <path report>

可能可以在运行加载过程和报告过程后配置延迟,但我不知道是否存在此选项。