Hello! I have an issue and need a little help over the same .
Suppose we have a custom metric created let’s say …
GoogleGETAPI_success_count
Which records the number of times this API call gives a 200 OK as response.
I am using the HTML Reporter provided by k6 to generate an HTML report for this script. I am using this with handleSummary() method .
Now when the HTML report is generated I am.unable to see this particular counter metrics in it .
If I use another metric which is of Trend Type and add response.timings.duration of the API request to it …the same custom metric can be seen in the HTML report generated.
How do I get the counter metrics to be recorded and displayed as a custom metric inside HTML report generated by K6
Hi @tusharjadhav3302,
welcome to the community forum
I am using the HTML Reporter provided by k6 to generate an HTML report for this script. I am using this with handleSummary() method .
Are you using GitHub - benc-uk/k6-reporter: Output K6 test run results as formatted & easy to read HTML reports? It is a community project and it isn’t directly supported by k6
. I see an open issue for the same reason in the repository Report do not include Count metrics · Issue #32 · benc-uk/k6-reporter · GitHub, so Trend seems the only supported type for custom metrics.
If the HTML part is not a requirement for you then you could consider using a k6
Output and use a tool like Grafana for visualizing the metrics.
Here some examples:
Hi @codebien ,
Thank you so much for the reply! it was helpful.
Also I am checking this HTML report : K6-html-reporter NPM | npm.io and looks like it works for me !
Thanks again ! Go K6!