v0.3.0
k6x v0.3.0
is here π!
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 the dependency
is the same as that used in the "use k6 with"
pragma (practically the same as the string after the use k6 with
)
k6x run --with k6/x/mock script.js
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. The k6x-cache
volume is a persistent local docker volume. This is where the go cache and the go module cache are placed.