Forrest logo
back to the k6 tool

k6:tldr:89d4b

k6: Run load test locally with a given number of virtual users and duration.
$ k6 run --vus ${10} --duration ${30s} ${script-js}
try on your machine

This command is used to run a load test using the k6 performance testing tool.

Here is the breakdown of the command:

  • k6 run: This begins the execution of the k6 command-line tool.

  • --vus ${10}: This flag specifies the number of virtual users (VUs) to simulate during the load test. In this case, it is set to 10. These VUs simulate concurrent users making requests to the target system.

  • --duration ${30s}: This flag specifies the duration of the load test. It is set to 30 seconds (30s). So, the load test will run for 30 seconds, during which the VUs will continuously simulate user activity.

  • ${script-js}: This is the path or name of the JavaScript or TypeScript script file that contains the load test scenario. Replace ${script-js} with the actual file name or path to your load test script.

Overall, this command runs a load test for 30 seconds with 10 virtual users using the specified script file.

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