Test metadata vizualization (environment variables, ...)

I have a test script, which is composed by several javascript files, that can be parametrized by environment variables, I run the script on the cloud using the cli from my VSC; k6 cloud my-entry-point.js -e MY_PARAM=VALUE. From my understanding the k6 cloud does a k6 archive which create a tar file with a metadata.json. This metadata.json contains then my environment parameters. How can I vizualize this metadata file on the Cloud ?
Same for other JS file, on the cloud I only see my my-entry-point.js file but not the other files that I import.

Unfortunately you can’t see other script files or the used environment variables in the cloud yet. We intend to implement both of these things and more, but I can’t give a ETA yet, sorry. As a workaround for now, you could do something like this:

if (__VU == 0) {

this will dump the environment variables in the logs tab.

Thanks for the suggestion, I already thought about that, the issue that I see is that based on the docu the logs are only retain for 3 days! For the moment I used the Test Notes that I enter manually after the test has been started. Is there any command line option to pass a Test Note when starting the test from the CLI ?

@Brice, unfortunately that’s also one of the other improvements we already have planned. We have it in the pipeline, and it’s likely to land sooner than support for multiple files and environment variable displays, but I can’t give any firm ETAs there either :disappointed:

@Brice, we created a new public repo with feature requests for our cloud product: Issues · grafana/k6-cloud-feature-requests · GitHub

Here are the issues you brought up:

Giving them a :+1: won’t hurt in helping us prioritize them higher :sweat_smile:

Hi Ned

Thanks very much for the information.

Best regards

Hi @Brice, you can now pass a note as an option when starting a test from the CLI.
See https://k6.io/docs/cloud/creating-and-running-a-test/cloud-tests-from-the-cli/#cloud-execution-options
I hope it helps!

1 Like