Skip to content

Releases: grafana/k6

v0.18.2

07 Dec 16:24
Compare
Choose a tag to compare

Features:

  • k6/http: Limit concurrent requests in http.batch() calls. (#296)

    export let options = {
      batch: 20, // Default: 10
    }
  • Flag to blacklist certain IP ranges from being called from scripts. (#389)

  • Flag to disable running of thresholds. (#42)

  • Archives now contain original sources, not transpiled gibberish. (#387)

  • k6/http: Enabled TLS Renegotiation

Fixed:

  • Broken colouring on Windows (#398)
  • Incorrect progress bars when using stages (#347)
  • Unhelpful errors from -o cloud
  • Tests with -o cloud failing when sources were read from stdin (#375)

v0.18.0

21 Nov 20:24
Compare
Choose a tag to compare

This release was quite some time in the making, and for good reason - we changed a ton of stuff under the hood, merged a bunch of big features, and we had to make sure it was all stable before releasing it out into the wild.

Note! This version removes the web UI, which has been unmaintained and deprecated for several releases. If you're interested in maintaining a web UI, please contact us and we can work something out. (#300)

Note! Due to some significant changes in how we store disk configuration, if you previously used k6 login to store credentials for influxdb, you will need to do so again after updating to v0.18.0.

New Features!

k6/html: full jQuery API compatibility!! (#197)

This is a huge feature and incredibly exciting to us - res.html() now returns an object that supports the full jQuery API!

check(http.get("http://example.com/"), {
    "status is 200": (r) => r.status === 200,
    "caption is correct": (r) => r.html("h1").text() == "Example Domain",
})

Well, we say the full, but there are actually two exceptions: stuff like height() and width() that only makes sense if you're actually rendering the page in a browser, and anything that modifies the document (data("key", "value")), which doesn't make any sense in the context of a load testing tool.

If you'd like to see these two added, show us a use case and we'll see what we can do!

It's worth noting that this isn't just a huge feature, it's the single biggest pull request I have ever seen, adding over 5000 lines of code (many of which are code generated!). For scale, the entire k6 codebase (before this PR) was around 20,000 lines.

Huge thanks to @mitnuh for their tireless work on this!

Complete rework of the CLI! (#110)

This is a huge change and the biggest culprit for this delay - because the CLI is so important, and because of the sheer size of this change, we couldn't just ship it off until we were absolutely sure it worked.

Not only is the new CLI code substantially easier to work with for us - we don't have to get all antsy about adding any CLI-facing features out of fear we may break something:

  • Help pages (k6 --help) are now more helpful, complete with usage examples.
  • There's no more weirdness with certain flags having to be in certain positions (eg. k6 run -v now works, not just k6 -v run).
  • And we threw in coloured output for control commands while we were at it.

All options can now be set from the environment

Yup. Instead of -u 100/--vus 100, or specifying the vus: 100 option, you can now set K6_VUS in the environment instead.

The order of predecence for this is: defaults > disk config > script options > environment variables > commandline flags.

k6/http: You can pass objects to http.batch() (#295)

http.batch([
    { "method": "GET", "url": "http://example.com/" },
])

Thanks to @borjacampina for this contribution!

k6/http: TLS information in HTTP responses (#322)

HTTP responses now have several new fields, all of which are also exported as tags, and a couple of new constants for their values:

  • tls_version (eg. http.TLS_1_2)
  • tls_cipher_suite (eg. "TLS_RSA_WITH_RC4_128_SHA")
  • ocsp
    • produced_at (timestamp, ms)
    • this_update (timestamp, ms)
    • next_update (timestamp, ms)
    • revoked_at (timestamp, ms)
    • revocation_reason (eg. http.OCSP_REASON_KEY_COMPROMISE)
    • status (eg. http.OCSP_STATUS_GOOD)

k6/http: New API for cookie management (#323)

This is a pretty big feature youthat has been asked about for a long time - we now have a comprehensive API for anything you could possibly want to do regarding cookies.

There's much more, but the biggest thing that's been asked for is how to manually set a cookie for a request, and read it back out - without messing about with manually constructing HTTP headers:

check(http.get("http://example.com/", { cookies: { name: "value" } }), {
    "status is 200": (r) => r.status === 200,
    "some cookie is set": (r) => r.cookies.my_cookie === "hi",
});

Much smaller Docker images (#337)

With the web UI gone, we could drop our Node dependency, and we're also now using Alpine Linux base images.

Thanks to @StephenRadachy for this contribution!

Much faster loading of external ES5 libraries! (#212)

The code responsible for loading JS files now skips invoking Babel for files that are already valid ES5. Yes, it was actually that simple, and it cuts minutes(!) off loading big, already minimised libraries like Faker.js.

k6/encoding: base64 encoding and decoding (#327)

What it says on the tin. Supports normal or URL-safe encodings.

import enc from "k6/encoding";

export default function() {
	console.log(enc.b64encode("hello!!")); // aGVsbG8hIQ==
	console.log(enc.b64encode("hello!!", "rawurl")); // aGVsbG8hIQ
}

Bugs fixed!

  • The iterations metric wasn't exported properly. (#313)

  • Sporadic errors at the end of tests. (#358)

  • Incorrect scaling/failed requests at the start of a test when using stages. (#326)

  • k6/ws: The close event sometimes wouldn't be emitted. (#329)

  • k6/ws: Respond to pings with pongs as decreed by the ws spec. (#330)

  • k6/ws: Missing metrics at the end of a test. (#333)

  • cloud: Anonymous tests with -o cloud now show correct URLs. (#348)

  • cloud: More useful error messages from tests with -o cloud.

v0.17.2

01 Sep 10:14
Compare
Choose a tag to compare

New Features!

  • TLS client certificates:


    export let options = {
        tlsAuth: [
            { domains: ["example.com"], cert: open("mycert.pem"), key: open("mycert-key.pem") }
        ]
    };
  • Reduced memory usage: Using buffer pools for HTTP responses

Fixed:

  • Go build error (#293)
  • Quieter output with —quiet
  • Fixed usage reports
  • Some minor fixes & refactoring

v0.17.1

04 Aug 15:51
Compare
Choose a tag to compare

New Features:

  • Calling native functions from JS now has less overhead.

Fixed:

  • Cookies not getting persisted (#289, #286)
  • Crash involving a double-closed channel (#279)
  • __VU now works again; was broken in v0.17.0 (#280)

v0.17.0

07 Jul 17:08
Compare
Choose a tag to compare

New Features!

  • TLS configuration options (thanks @gbts!) #235

    export let options = {
        tlsCipherSuites: [
            "TLS_RSA_WITH_RC4_128_SHA",
            "TLS_RSA_WITH_AES_128_GCM_SHA256",
        ],
        tlsVersion: {
            min: "ssl3.0",
            max: "tls1.2"
        },
    };
  • HMAC support added to the k6/crypto module (thanks @edgardoalz!) #256

  • A new, more intuitive way to display checks (thanks @ppcano!) #253

  • Percentiles in metrics now displayed as p(95) rather than p95, for consistency with the threshold syntax (@ppcano again!) #255

  • New proto tag on http_* metrics for telling whether HTTP/1.1 or HTTP/2.0 is used. f4b4456

Bug fixes!

  • Inaccurate data_sent and data_received values (thanks @jkpl!) #272
  • console.log() calls made past the end of the test are now ignored. 77c90b8
  • The stock Grafana setup with docker-compose now allows anonymous access. #260
  • Checks in the same batch were tagged with the same name by accident. #270
  • HTTP/2 requests were broken for a while. #268
  • Imports are no longer dumped into the global namespace. #276
  • A couple of odd race conditions taken care of.

…along with some major changes under the hood: the groundwork for cloud- and clustered execution, simpler and more resilient VU orchestration algorithms, and more.

Also: we now have a beautiful Grafana dashboard for k6 and InfluxDB, contributed by @geekdave! Check it out: https://grafana.com/dashboards/2587

v0.16.0

16 Jun 13:06
Compare
Choose a tag to compare

New Features:

Fixed:

  • Bandwidth tracking is now more accurate, but also less granular. (#242)
  • Invalid path construction on Windows. (#227)
  • Invalid stage duration serialization in archives. (#241)
  • A race condition in http.batch() that could lose samples. (b2e140c)
  • Invalid durations reported from cancelled requests. (#236)
  • Checks ran past the end of a test weren't properly ignored. (eda9294)

v0.15.0

19 May 19:20
Compare
Choose a tag to compare

New Features:

  • Archive your tests for easy distribution!
    This will also be the underpinnings of clustered execution, see #140.
  • timeout option for HTTP requests.
  • userAgent option for HTTP requests.
  • Request errors are no longer thrown, but logged as warnings.

Fixed:

  • __ENV was broken in v0.13.0.
  • insecureSkipTLSVerify was broken in v0.13.0.
  • HTTP_PROXY/HTTPS_PROXY/NO_PROXY in the environment weren't respected properly.

v0.14.0

10 May 15:09
Compare
Choose a tag to compare

New Features:

  • Integration with Load Impact Insights
  • k6/crypto module (thanks @gbts!)

Fixed:

  • Sink internals accidentally exposed through JSON
  • The JS runner didn't respect --max-redirects
  • Sane connection reuse behavior
  • IPv6 dialing

v0.13.0

08 May 15:50
Compare
Choose a tag to compare

After a long time in the making, our new and improved JS runner is here! Everything (especially startup) should now be significantly faster, but there may still be some rough edges here and there.

v0.12.2: Merge pull request #175 from loadimpact/feature/js2

19 Apr 10:49
Compare
Choose a tag to compare