简体   繁体   中英

Exception generated when trying to generate jmeter HTML reports

I am trying to generate html reports through the jmeter non gui commands.

HTML reports are not getting generate and also seeing the below error with regards to the same.

COMMAND USED TO RUN:

jmeter -Jjmeter.save.saveservice.output_format=csv -Jjmeter.reportgenerator.apdex_statisfied_threshold=1500  -n -t D:\jmeter\v1_images_scenario.jmx -l D:\jmeter\images.jtl -e -o D:\jmeter\Reports\

ERROR MESSAGE:

Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Cannot assign "${jmeter.reportgenerator.apdex_satisfied_threshold}" to property "set_satisfied_threshold" (mapped as "setSatisfiedThreshold"), skip it Facing same error after setting the threshold as well .

Tried searching more on this , but couldn't be able to resolve the issue. Would be great if some once could help me on this.Thanks In Advance

You have a typo in your command, change it to look like:

jmeter -Jjmeter.save.saveservice.output_format=csv -Jjmeter.reportgenerator.apdex_satisfied_threshold=1500 -n -t D:\jmeter\v1_images_scenario.jmx -l D:\jmeter\images.jtl -e -o D:\jmeter\Reports\

ie change statisfied to satisfied

Going forward check the following files:

  • reportgenerator.properties
  • user.properties
  • jmeter.properties

For the following line:

jmeter.reportgenerator.apdex_satisfied_threshold=${jmeter.reportgenerator.apdex_satisfied_threshold}

and once found - delete or remove it, this way you will be able to generate the dashboard using default threshold of 500 if you don't override the property.

More information:

Although the accepted answer resolved the OP's issue, I thought I would add an additional answer here as I ran in to this same behaviour and was unable to find a quick answer, thus wasting a lot of time searching, digging and the like.

In my scenario I had, mistakenly, changed from using -q <properties file> to -p <properties file> . What I didn't realize (at the time) is -q defines an additional properties file to be read, whereas -p overrides the jmeter.properties file. Thus when using -p I was missing properties that were required to correctly generate the dashboard. Incidentally, the "Summariser" (logger that periodically writes statistics to stdout) also stopped working, so that was an additional side effect. Interestingly my tests weren't failing, just the dashboard creation error and the missing Summariser.

Looking at the official documentation: https://jmeter.apache.org/usermanual/get-started.html#options this distinction is made, but other sites out there aren't so clear on that matter. So there you go...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM