At k6, we pride ourselves in always putting the need of developers and testers first. Throughout the years, we've tried many different solutions to make the experience of authoring load tests as pleasant and value-creating as possible.
In the since-sunsetted LoadImpact v3, we allowed users to author tests in the lua scripting language, which, to us, was a big improvement to the earlier generation of tools, which either only allowed GUI-based test authoring, declarative configuration in XML files or writing your tests in C.
Today, we're thrilled to announce our next exciting step, further pushing the limits of how intuitive and easy-to-use test authoring can be. As of this message, all users are invited to try out our brand-new runtime!
A couple of years ago one of our founders, Ragnar Lönn, did a nifty no-frills proof of concept called curl-basher.
Our new runtime builds upon the promising findings of that PoC, taking it one step further and giving you, the user, access to the whole powerhouse that is bash.
So, let's have a look at how this will work in practice. During the beta-phase, you'll have to compile the k6 binary yourself using xk6:
That will produce a k6 binary in your current folder:
Once it reaches General Availability, this will become the default mode for writing k6 scripts, but for now we'll have to import the bash support function exec from k6/x/exec:
As you can tell from that snippet, it's really easy and intuitive to use. It's also blazingly fast! Let's run it and have a look at the output:
Only 8 seconds for 20 requests? Wow, that's fast! You can also see that we in our script added support for pass/fail visualisation using +'s to signal success, and - to signal fail.
Plans for the future
You tell us! We are planning to add support for other popular runtimes as well, like perl, x86-assembler and BASIC.
Imagine being able to author your tests with direct memory access! The future truly is now!
😂 Happy April's fools!
If you've gotten this far, we probably don't need to tell you this, but: Happy April's fools!
Did you enjoy the article? Did we trick you? Please let us know in the comments below.
the k6 Team