No results for

Powered byAlgolia
⚠️ This documentation is outdated. Please visit for the latest k6 documentation.📚

Externally controlled

Control and scale execution at runtime via k6's REST API or the CLI.

Previously, the pause, resume, and scale CLI commands were used to globally control k6 execution. This executor does the same job by providing a better API that can be used to control k6 execution at runtime.

Note that, passing arguments to the scale CLI command for changing the amount of active or maximum VUs will only affect the externally controlled executor.


The externally-controlled executor has no graceful stop.

Besides that, this executor has all the common configuration options, and these particular ones:

duration(required)stringTotal test duration.-
vusintegerNumber of VUs to run concurrently.-
maxVUsintegerMaximum number of VUs to allow during the test run.-

When to use

If you want to control the number of VUs while the test is running.

Important: this is the only executor that is not supported in k6 cloud, it can only be used locally with k6 run.


In this example, we'll execute a test controllable at runtime, starting with 10 VUs up to a maximum of 50, and a total duration of 10 minutes.

1import http from 'k6/http';
3export const options = {
4 discardResponseBodies: true,
5 scenarios: {
6 contacts: {
7 executor: 'externally-controlled',
8 vus: 10,
9 maxVUs: 50,
10 duration: '10m',
11 },
12 },
15export default function () {
16 http.get('');