Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main new features:
Add dependencies on the command line
In some cases, it may be useful to add dependencies on the command line without modifying the test script.
Additional dependencies and version constraints can be specified on the command line with the --with flag.
--with dependency
you can specify additional dependencies and version constraints, the form of thedependency
is the same as that used in the"use k6 with"
pragma (practically the same as the string after theuse k6 with
)The example above adds the xk6-mock extension to the list of dependencies.
Docker Image
In certain circumstances, it can be useful to run k6x using the docker engine itself, as a drop-in replacement of the k6 docker image. Therefore, it is advisable to publish in the form of a docker image that contains the tools necessary for building (golang, git).
The szkiba/k6x docker image is available from the Docker Hub.
The k6x docker builder (
--builder docker
) now uses the k6x docker image instead of the xk6 docker image to build the k6 binary. This results in a significant reduction in build time. The speed increase is due to the use of persistent go cache. Thek6x-cache
volume is a persistent local docker volume. This is where the go cache and the go module cache are placed.