Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddK6

Method
📦 CommunityToolkit.Aspire.Hosting.k6 v13.6.1
func (DistributedApplicationBuilder) AddK6(
name string,
options ...*AddK6Options,
) K6Resource

Signature

methodAddK6builder
Adds a Grafana k6 container resource to the application model. The default image is and the tag is .
AddK6(
name string,
options ...*AddK6Options,
) K6Resource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddK6OptionsOptional settings, described under Options.

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

EnableBrowserExtensions*boolEnables browser automation and end-to-end web testing to k6.
Port*float64The host port to bind the underlying container to.
K6Resource

A reference to the IResourceBuilder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder