Forrest logo
back to the k6 tool

k6:tldr:f064c

k6: Run load test locally using the base JavaScript compatibility mode (significantly faster).
$ k6 run --compatibility-mode=base ${script-js}
try on your machine

This command runs a load testing script using the k6 testing tool with the specified compatibility mode. Here's a breakdown of the different components:

  • k6: The command to execute the k6 testing tool.
  • run: The specific k6 command to run a load testing script.
  • --compatibility-mode=base: This flag sets the compatibility mode to "base." Compatibility mode determines the behavior of k6 runtime, plugins, and other features. "base" refers to the standard mode of operation for k6.
  • ${script-js}: This is a placeholder for the path or filename of the JavaScript script you want to run. You would replace ${script-js} with the actual path or filename of your script.

By running this command, k6 will execute the specified script using the base compatibility mode, allowing you to perform load testing and measure the performance of your application or website.

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