In some cases, it may be useful to add dependencies on the command line without modifying the test script.
Suggested Solution (optional)
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.
Already existing or connected issues / PRs (optional)
This feature is a simplified version of #8, making it obsolete.
Feature Description
In some cases, it may be useful to add dependencies on the command line without modifying the test script.
Suggested Solution (optional)
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.
Already existing or connected issues / PRs (optional)
This feature is a simplified version of #8, making it obsolete.