grafana/jslib.k6.io

Show the number of passed checks when all the checks pass

mstoykov opened this issue · 3 comments

This was reported in the community forum and it will be possible to be done by the users themself after grafana/k6#1768 , but maybe it is good idea to be included by default.

na-- commented

As I mentioned in grafana/k6#1806, in k6 v0.31.0 we'll adopt the latest version of the JS-based summary generation code from jslib.k6.io (originally submitted in #20), now that we have handleSummary(). So I've moved this issue to the jslib repo, given that any change requests for the default text summary k6 outputs should be opened here.

In this case, we could easily add another option to generateTextSummary() that would cause k6 to always show the number of passed checks:
https://github.com/loadimpact/jslib.k6.io/blob/07faf739629462571584fefcf85478dad64993c9/lib/k6-summary/0.0.1/index.js#L24-L29

https://github.com/loadimpact/jslib.k6.io/blob/07faf739629462571584fefcf85478dad64993c9/lib/k6-summary/0.0.1/index.js#L374-L375

https://github.com/loadimpact/jslib.k6.io/blob/07faf739629462571584fefcf85478dad64993c9/lib/k6-summary/0.0.1/index.js#L70

As I mentioned in k6io/k6#1806, in k6 v0.31.0 we'll adopt the latest version of the JS-based summary generation code from jslib.k6.io (originally submitted in #20), now that we have handleSummary(). So I've moved this issue to the jslib repo, given that any change requests for the default text summary k6 outputs should be opened here.

Out of curiosity (I haven't read the other issues in detail so it might already be stated somewhere there); what would happen if you run k6 somewhere where you don't have WAN access? Is it bundled in the k6 binary or would it just fail/not print anything?

na-- commented

It is bundled in the binary. The PR with moving the the JS summary (and a bunch of other things... 😅 ) is already done (grafana/k6#1975), we just won't merge it until we release k6 v0.32.0