Forrest logo
back to the k6 tool

k6:tldr:7f3f3

k6: Run load test locally.
$ k6 run ${script-js}
try on your machine

The command "k6 run ${script-js}" is used to run a script file using the k6 tool. Here's a breakdown of the command:

  • "k6" is the executable command for the k6 tool.
  • "run" is a k6 subcommand used to execute a script file.
  • "${script-js}" is a placeholder representing the name or path of the JavaScript file you want to run.

The script file specified by "${script-js}" should contain the actual logic and code you want to execute using k6. It can include performance tests, scenarios, stages, and other configuration options to define your load testing scenarios.

To use the command, you need to replace "${script-js}" with the actual file name or path of your script. For example, if your script file is named "load_test.js" and it's located in the same directory as the k6 executable, you would use the command "k6 run load_test.js" to run the script.

Running the command will execute the JavaScript file using k6, which will load the script, execute the logic, and report the results of the load test or performance testing.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the k6 tool