K6 Executor

k6 executor allows you to run 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

This feature is only available in the unstable snapshot. You can specify special cli options for K6, for example:

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