Skip to content

How to run

Install vikhry from PyPI:

Terminal window
pip install vikhry

At the moment, PyPI is the only supported installation method.

For local work, the fastest way to start everything is:

Terminal window
vikhry infra up --worker-count 3 --scenario my_scenario:DemoVU

This command:

  • checks that Docker is available
  • starts Redis in a local Docker container
  • starts the orchestrator
  • starts the requested number of workers

After startup:

  • UI: http://127.0.0.1:8080/
  • API: http://127.0.0.1:8080

Stop the full stack with:

Terminal window
vikhry infra down

The built-in UI is served by the orchestrator.

By default, open:

http://127.0.0.1:8080/

If you start the orchestrator with another --port, the UI moves to that port as well.

If you do not want to use infra, you can run Redis, the orchestrator, and workers as separate processes.

vikhry expects a Redis instance. By default, the CLI uses:

redis://127.0.0.1:6379/0

How Redis is started is up to you.

Terminal window
vikhry orchestrator start --scenario my_scenario:DemoVU

By default, this starts the API and UI on port 8080, so the interface is available at http://127.0.0.1:8080/.

Useful options:

  • --host and --port to change bind address
  • --redis-url to point to another Redis instance
  • --detach/--foreground to choose background or foreground mode

Stop it with:

Terminal window
vikhry orchestrator stop
Terminal window
vikhry worker start \
--worker-id worker-1 \
--scenario my_scenario:DemoVU

Start more workers with different --worker-id values.

Useful options:

  • --redis-url to connect to the same Redis as the orchestrator
  • --http-base-url to set a default base URL for relative HTTP calls
  • --detach/--foreground to choose background or foreground mode

Stop a worker with:

Terminal window
vikhry worker stop

Start a test with a target number of users:

Terminal window
vikhry test start --users 10

If your scenario on_init(...) requires parameters, pass them through the CLI:

Terminal window
vikhry test start \
--users 10 \
--init-param base_url=http://localhost:8000

Change the target users during a run:

Terminal window
vikhry test change-users --users 25

Stop the test:

Terminal window
vikhry test stop