Forrest logo
back to the k6 tool

k6:tldr:2ddfb

k6: Run load test locally using InfluxDB to store results.
$ k6 run --out influxdb=${http:--localhost:8086-k6db} ${script-js}
try on your machine

This command is used to run a load testing script using the k6 tool and specify the output destination as an InfluxDB database.

Here's an explanation of each part of the command:

  • k6 run: Runs the k6 load testing tool.

  • --out influxdb=${http:--localhost:8086-k6db}: Specifies the output destination as an InfluxDB database with the following details:

    • --out influxdb: Configures the output destination as an InfluxDB database.
    • ${http:--localhost:8086-k6db}: Specifies the InfluxDB connection details. In this case, it uses the http protocol, the host is 'localhost', the port is '8086', and the database is named 'k6db'. This means the test results will be sent to an InfluxDB database running on the local machine.
  • ${script-js}: Specifies the path to the k6 script that you want to run. This should be replaced with the actual path to your script file.

Overall, this command runs a load testing script using k6 and sends the results to an InfluxDB database running on the local machine.

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