No results for

Powered byAlgolia

The is a collection of external JavaScript libraries that can be directly imported in k6 scripts.

utilsSmall utility functions useful in every day load testing
expectMicro-framework for writing tests in a style of Jest or ava.
httpxWrapper around the http that simplifies session handling
-Documentation for other libraries will be added shortly.


import { check, sleep } from 'k6';
import jsonpath from '';
import { randomIntBetween, randomItem, uuidv4 } from '';
const testData = {
user: {
name: 'Batman',
export default function () {
check(testData, {
'JSON path works': () => jsonpath.value(testData, '') === 'Batman',
console.log(randomItem([1, 2, 3, 4]));
sleep(randomIntBetween(1, 5)); // sleep between 1 and 5 seconds

The complete list of supported libraries can be viewed on


Libraries hosted on jslib have versions. For example "httpx.js" library currently has v0.0.1, v0.0.2 and v0.0.3.

We recommend that you use the last version available at the time of writing your k6 scripts. Older versions will continue to be hosted on jslib, so you don't have to worry about your scripts breaking.

This documentation is for the last version of these libraries. If the examples documented here don't work, please check that you are using the latest version.

If you don't want to depend on jslib or want to make modifications to the code, you can download the libraries and use them locally.