withScript

Method
📦 CommunityToolkit.Aspire.Hosting.k6 v13.6.1
interface K6Resource {
// ... omitted for brevity
withScript(
scriptPath: string,
virtualUsers?: number,
duration?: string,
summaryMode?: K6SummaryMode): K6Resource;
}

Signature

methodwithScriptbuilder
Runs a k6 JS script when starting the Grafana k6 container resource.
withScript(
scriptPath: string,
virtualUsers?: number,
duration?: string,
summaryMode?: K6SummaryMode): K6Resource
scriptPathstringThe path to the JS script to run.
virtualUsersnumberoptionalThe number of virtual users for the test..
durationstringoptionalThe duration of the test, e.g. `30s`.
summaryModeK6SummaryModeoptionalThe summary mode of the test execution.
K6Resource

Applies to

This method applies to the following types: