How to run
Installation
Section titled “Installation”Install vikhry from PyPI:
pip install vikhryAt the moment, PyPI is the only supported installation method.
Run the full local stack with infra
Section titled “Run the full local stack with infra”For local work, the fastest way to start everything is:
vikhry infra up --worker-count 3 --scenario my_scenario:DemoVUThis 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:
vikhry infra downWeb UI
Section titled “Web UI”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.
Run components separately
Section titled “Run components separately”If you do not want to use infra, you can run Redis, the orchestrator, and workers as separate processes.
1. Start Redis
Section titled “1. Start Redis”vikhry expects a Redis instance. By default, the CLI uses:
redis://127.0.0.1:6379/0How Redis is started is up to you.
2. Start the orchestrator
Section titled “2. Start the orchestrator”vikhry orchestrator start --scenario my_scenario:DemoVUBy default, this starts the API and UI on port 8080, so the interface is available at http://127.0.0.1:8080/.
Useful options:
--hostand--portto change bind address--redis-urlto point to another Redis instance--detach/--foregroundto choose background or foreground mode
Stop it with:
vikhry orchestrator stop3. Start one or more workers
Section titled “3. Start one or more workers”vikhry worker start \ --worker-id worker-1 \ --scenario my_scenario:DemoVUStart more workers with different --worker-id values.
Useful options:
--redis-urlto connect to the same Redis as the orchestrator--http-base-urlto set a default base URL for relative HTTP calls--detach/--foregroundto choose background or foreground mode
Stop a worker with:
vikhry worker stop4. Start and control a test
Section titled “4. Start and control a test”Start a test with a target number of users:
vikhry test start --users 10If your scenario on_init(...) requires parameters, pass them through the CLI:
vikhry test start \ --users 10 \ --init-param base_url=http://localhost:8000Change the target users during a run:
vikhry test change-users --users 25Stop the test:
vikhry test stop