K6 Executor

k6 executor allows running K6 based test suites.

In order to launch K6 executor, you can use yaml config like in the example below

Example:

execution:
- executor: k6
  concurrency: 10  # number of K6 workers
  hold-for: 1m  # execution duration
  iterations: 20  # number of iterations
  scenario:
    script: k6-test.js  # has to be a valid K6 script

Please keep in mind that it is necessary to provide a valid script to run tests.

Script Example

This is an example of a valid script from K6 website:

import http from 'k6/http';
import { sleep } from 'k6';
 
export default function () {
  http.get('https://blazedemo.com/');
  sleep(1);
}

Command-line Settings

You can specify special cli options for K6, for example:

modules:
  k6:
    cmdline: --out json=result.json