Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependencies on the command line #10

Closed
szkiba opened this issue Oct 1, 2023 · 0 comments
Closed

Add dependencies on the command line #10

szkiba opened this issue Oct 1, 2023 · 0 comments
Labels
feature Feature Request

Comments

@szkiba
Copy link
Collaborator

szkiba commented Oct 1, 2023

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant