2
votes

I have issues while generating dashboard report in Jmeter (through command line) 1)Coped reportgenerator Properties to User Properties file 2)Restarted Jmeter to pick up the data 3)Added below to user properties file:

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

I feel main problem is with mismatch with the CSV file/JTL file I have and trying to create report. – Give me your suggestions

ERROR | An error occurred: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples:Mismatch between expected number of columns:16 and columns in CSV file:6, check your jmeter.save.saveservice.* configuration at org.apache.jmeter.report.dashboard.ReportGeenter code herenerator.generate(ReportGenerator.java:246) at 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) at org.apache.jmeter.NewDriver.main(NewDriver.java:248) Caused by: org.apache.jmeter.report.core.SampleException: Mismatch between expected number of columns:16 and columns in CSV file:6, check your

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

2 Answers

0
votes

I made the same mistake. Just forget about those properties and copy in user.properties file 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))(-success|-failure)? jmeter.reportgenerator.exporter.html.filters_only_sample_series=true

Then from the command line run this:

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

Where:

.\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
0
votes

The file csv or jtl may be in writing still, so jmeter process report try to read file while another field and row are added to the same file. Infact I resolve the error by manual running of report generation command on the same jtl file:

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

may be possible configure a delay after running load process and the report process but I don't know if exist this option.