K6Resource.WithScript

Method
📦 CommunityToolkit.Aspire.Hosting.k6 v13.6.1
type K6Resource interface {
// ... omitted for brevity
WithScript(
scriptPath string,
options ...*WithScriptOptions,
) K6Resource
}

Signature

methodWithScriptbuilder
Runs a k6 JS script when starting the Grafana k6 container resource.
WithScript(
scriptPath string,
options ...*WithScriptOptions,
) K6Resource
scriptPathstringThe path to the JS script to run.
options...*WithScriptOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithScriptOptions argument.

VirtualUsers*float64The number of virtual users for the test..
Duration*stringThe duration of the test, e.g. 30s.
SummaryMode*K6SummaryModeThe summary mode of the test execution.
K6Resource

The IResourceBuilder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: