Methods
delay(ms) → {Promise.<void>}
Introduce a delay in milliseconds.
Parameters:
| Name | Type | Description |
|---|---|---|
ms | number | The duration of the delay in milliseconds. |
- Source
Returns:
- A Promise that resolves after the delay.
- Type:
- Promise.<void>
(async) generateK6Script(scriptContent, scriptTypeopt, overwriteopt) → {Promise.<string>}
Generates a temporary k6 script file.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scriptContent | string | The content of the k6 script. | ||
scriptType | string | <optional> | 'load' | Type of script (e.g., 'load'). |
overwrite | boolean | <optional> | false | Whether to overwrite the report file. |
- Source
Returns:
- Path to the generated k6 script file.
- Type:
- Promise.<string>
(async) runK6Script(scriptPath, overwriteopt) → {Promise.<{stdout: string, stderr: string, code: number}>}
Runs the k6 script with custom branding.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scriptPath | string | Path to the k6 script file. | ||
overwrite | boolean | <optional> | false | Whether to overwrite the report file. |
- Source
Returns:
- k6 execution result.
- Type:
- Promise.<{stdout: string, stderr: string, code: number}>