Need help with masking a password for a k6 test using gitlab

I’m using gitlab and k6 to run some api load testing, how would I mask the password in a command like this that i’m running on a gitlab runner:

k6 run -e CONFIG=…/…/k6env.json -e PASSWORD=$password tests/Load/api_test.js

I’m guessing something is off with my syntax, but if anyone knows a solution i’d appreciate it.

Hi @paul424242!

It seems more like a gitlab issue rather than a k6 issue. I am not a gitlab expert. If you want to hide the password value in the logs, wouldn’t this not help?

2 Likes