mix k6.gen.test (k6 v0.2.1)

Generate a new k6 test.

Tests will be placed in the priv/k6 folder of your project by default. This can be customized via the :k6, :workdir configuration. By default a test for a generic rest-like API will be generated. However, the template to use for the generation of tests can be specified via the --type flag.

Command line options

  • --type - the template to use to generate the new test. Supported types are rest (default), graphql, grpc, websocket, phoenix-channel and liveview.
  • --url - the url of the target application. When not set, the generator will try to detect it automatically.


$ mix k6.gen.test test_name
$ mix k6.gen.test --type graphql test_name
$ mix k6.gen.test --url "http://localhost:8000" test_name

Link to this section Summary


Callback implementation for Mix.Task.run/1.

Link to this section Functions

Callback implementation for Mix.Task.run/1.