K6Resource

Handle
📦 CommunityToolkit.Aspire.Hosting.k6 v13.6.1
interface K6Resource
extends IComputeResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport {
readonly primaryEndpoint: EndpointReference;
withK6OtlpEnvironment(): K6Resource;
withScript(
scriptPath: string,
virtualUsers?: number,
duration?: string,
summaryMode?: K6SummaryMode): K6Resource;
}

Properties

propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Grafana k6 instance. This endpoint is used for all API calls over HTTP.

Methods

Set K6 environment variables from the existing OTEL environment set for this resource. See https://grafana.com/docs/k6/latest/results-output/real-time/opentelemetry/#configuration.
withK6OtlpEnvironment(): K6Resource
K6Resource
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