From d0b3d1cd3b44740109dc0ed18b3742e9c60993d2 Mon Sep 17 00:00:00 2001 From: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com> Date: Tue, 23 May 2023 11:53:30 -0300 Subject: [PATCH] [feat] improve intro to scenario docs - Better description with less metaphor - Example Part of #808 --- .../02 Using k6/14 Scenarios/01 Executors.md | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/data/markdown/translated-guides/en/02 Using k6/14 Scenarios/01 Executors.md b/src/data/markdown/translated-guides/en/02 Using k6/14 Scenarios/01 Executors.md index 3da8b53b9..b1cd3db47 100644 --- a/src/data/markdown/translated-guides/en/02 Using k6/14 Scenarios/01 Executors.md +++ b/src/data/markdown/translated-guides/en/02 Using k6/14 Scenarios/01 Executors.md @@ -1,14 +1,28 @@ --- title: 'Executors' -excerpt: 'Executors are the workhorses of the k6 execution engine. Each one schedules VUs and iterations differently, and you choose one depending on the type of traffic you want to model to test your services' +excerpt: 'Executors control how k6 schedules VUs and iterations. Choose the executor to model traffic you want to model to test your services' --- -**Executors** are the workhorses of the k6 execution engine. Each one -schedules VUs and iterations differently, and you'll choose one depending on the type of traffic you -want to model to test your services. +**Executors** control how k6 schedules VUs and iterations. +The executor that you choose depends on the goals of your test and the type of traffic you want to model. +Define the executor in `executor` key of the scenario object. Possible values for `executor` are the executor name separated by hyphens. + +```javascript +export const options = { + scenarios: { + arbitrary_scenario_name: { + //Name of executor + executor: 'ramping-vus', + // more configuration here + }, + }, +}; +``` + +
For any given scenario, you can't guarantee that a specific VU can run a specific iteration. @@ -24,7 +38,7 @@ But, you _cannot_ reliably map, for example, the tenth VU to the tenth iteration | Name | Value | Description | | ---------------------------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Shared iterations](/using-k6/scenarios/executors/shared-iterations) | `shared-iterations` | A fixed amount of iterations are
"shared" between a number of VUs. | +| [Shared iterations](/using-k6/scenarios/executors/shared-iterations) | `shared-iterations` | A fixed amount of iterations are
shared between a number of VUs. | | [Per VU iterations](/using-k6/scenarios/executors/per-vu-iterations) | `per-vu-iterations` | Each VU executes an exact number of iterations. | | [Constant VUs](/using-k6/scenarios/executors/constant-vus) | `constant-vus` | A fixed number of VUs execute as many
iterations as possible for a specified amount of time. | | [Ramping VUs](/using-k6/scenarios/executors/ramping-vus) | `ramping-vus` | A variable number of VUs execute as many
iterations as possible for a specified amount of time. |