Search code examples
performancejmeterreportperformance-testingload-testing

Jmeter: format statistics data to have comma in HTML report


Is there a way to transform the statistics data to have comma (,) instead of dot (.) in the generated HTML report.

Like for the data in the attached image.

Statistics data from Jmeter


Solution

  • This is not something you can customize via JMeter Properties, you will have to do some JavaScript programming (not very complex thought)

    1. Locate dashboard.js.fmkr file under report-template\content\js folder (lives in "bin" folder of your JMeter installation)

    2. You will need to change 2 lines, as of JMeter 5.4.1 they are:

      • Line # 194 which looks like: item = item.toFixed(2) + '%';, you need to change it to:

        item = item.toFixed(2).toString().replace('.', ',') + '%';
        
      • Line # 213 which looks like: item = item.toFixed(2);, similarly change it to:

        item = item.toFixed(2).toString().replace('.', ',')
        

    Regenerate the dashboard and you should see the commas instead of dots.