1
votes

These are the steps that I followed to generate reports:

  1. I have the .jtl file
  2. I copy paste given sample configuration to my user.properties file located at apache-jmeter-5.0\bin
  3. I convert .jtl to aggregate report using CMDRunner.jar

    java -jar CMDRunner.jar --tool Reporter --generate-csv Demo17Results.csv --input-jtl Demo17Results.jtl --plugin-type AggregateReport
    
  4. Convert csv file got from step#3 to HTML reports

    I tried (1) jmeter -g Demo17Results.csv -o htmlReports/

Error: csv' does not contain the field names header, ensure the jmeter.save.saveservice.* properties are the same as when the CSV file was created or the file may be read incorrectly when generating report An error occurred: Mismatch between expected number of columns:17 and columns in CSV file:11, check your jmeter.save.saveservice.* configuration or check line is complete

I tried (2) jmeter -n -t Demo17Run.jmx -l Demo17Results.csv -e -o htmlReports/

Creating summariser <summary> Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:Demo17Results.csv is not empty

after emptying the csv file

Creating summariser <summary> Created the tree successfully using Demo17Run.jmx Starting the test Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445 summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%) Tidying up ... Error generating the report: org.apache.jmeter.report.core.SampleException: Could not read metadata ! ... end of run

What am I doing wrong to generate Jmeter HTML dashboard reports?

2

2 Answers

1
votes
  1. You don't need step 2, JMeter default configuration is just fine for dashboard generation
  2. You don't need step 3, the dashboard needs to be created from the Demo17Results.jtl file which contains full raw results, not statistics table
  3. Try re-running your test scenario with forcing deletion of the previous result file via -f argument:

    jmeter -n -f -t Demo17Run.jmx -l Demo17Results.jtl -e -o htmlReports/
    

If nothing helps double check you have not modified required results file configuration settings and increase JMeter logs verbosity for report.dashboard package by adding the next line to log4j2.xml file:

<Logger name="org.apache.jmeter.report.dashboard" level="debug" />
0
votes

I was getting a similar error when I was trying to generate the HTML dashboard report after the test run. Even though the path to the .jtl file was correct (and there were no spaces in the directory names), I was getting that error “Mismatch between expected number of columns...” I was pointing the command to a copy of the .jtl file I had made in another directory. I changed the command to pick up the .jtl file that was in JMeter\bin and that worked… no more error and the reports were generated. So, the command (run from JMeter\bin) that worked was: jmeter –g log.jtl –o C:\HTML_Reports.

Also, the output folder that is specified must not exist (JMeter will create it) or if it does exist, it must be empty.