When running K6 from Jenkins, the output in the console is hard to read because the special characters do not output correctly.
here is an example:

It would be nice to be able to pass an option to k6 run where these characters are replaced with something more likely to be readable output.
hmm on what OS are you running your Jenkins server? these are simple unicode characters like ‾, ✗, and ✓that should work reasonably well on most platforms, so I'm a bit surprised that Jenkins doesn't handle them correctly
Hi, thanks for the quick reply!
Jenkins is running on CentOS Linux release 7.3.1611 (Core)
This is the output from the console as viewed in the browser. I'm not sure how Jenkins gets the stdout into the browser, so it's possible it's something in that process.
@jhnclvr Could you please try running Jenkins with:
-Dfile.encoding=UTF8
or edit your Jenkins config file to add that option.
@jhnclvr If @cuonglm's suggestion doesn't work, try setting the LANG environment variable to en_US.UTF-8.
Hi @imiric and @cuonglm , I did try this article before posting this ticket:
https://www.linkedin.com/pulse/how-resolve-utf-8-encoding-issue-jenkins-ajuram-salim/
(And a couple other things)
However, I have not yet tried running Jenkins itself with -Dfile.encoding=UTF8.
I don't manage the Jenkins instance and there are hundreds of users, so testing that change may take some time. I will see if I can get the change added and report back.
Thanks for looking into this!
Just a heads up, here is how I'm working around the issue for the moment:
k6 run test1.js &> results.txt
retval=$?
sed -i 's/✗/X/g' results.txt
sed -i 's/↳/>/g' results.txt
sed -i 's/✓/Y/g' results.txt
sed -i 's/µ/u/g' results.txt
sed -i 's/—/-/g' results.txt
sed -i 's/‾/-/g' results.txt
cat results.txt
exit "$retval"
Not sure if/when I'll hear back about changing the Jenkins params, but I'll keep at it and update here whatever I find.
Closing this in favor of https://github.com/loadimpact/k6/issues/1748