17.8.2022

k6 load testing

K6 is a load testing library. https://k6.io/

It stood out to me, because it is the only load testing tool that supports WebSocket loadtests.

K6 is written in go and only uses javascript for scripting, the actual load test is executed in go code. Npm, node or a package.json are not needed.

Running a load test is as simple as:

Installing k6:

brew install k6

Writing a loadtest (e.g. loadtest.js):

import http from 'k6/http';
import { sleep } from 'k6';

export default function () {
  http.get('https://test.k6.io');
  sleep(1);
}

Running it with:

k6 run --vus 10 --duration 30s loadtest.js
Lucas

Softwareentwickler

Zur Übersicht

Standort Hannover

newcubator GmbH
Bödekerstraße 22
30161 Hannover

Standort Dortmund

newcubator GmbH
Westenhellweg 85-89
44137 Dortmund