Skip to content

CLI

Every pip install vericue ships a command-line client - useful for smoke-testing an application with the veriCue Runtime inside it, shell scripting, and poking at a UI interactively without writing a test.

Pick the transport with one flag: --endpoint for local IPC, --port for TCP.

bash
# local IPC - the path the app (or an injected run) announced
vericue --endpoint /run/user/1000/vericue/vericue-4213.sock ping

# TCP - Windows, remote CI, containers, devices
vericue --port 4242 ping

# every invocation also works as a module
python -m vericue --port 4242 ping

Global options

Options go before the subcommand:

OptionDefaultPurpose
--endpoint(none)Local IPC endpoint path (Linux/macOS); when given it takes precedence over --host/--port
--host127.0.0.1Server host (TCP)
--port4242Server TCP port
--token(none)Authentication token
--timeout10.0Connection/response timeout (seconds)

There is no local IPC on Windows, so --port is the transport flag there - see Limitations.

Results print as pretty-printed JSON on stdout.

Exit codes: 0 success · 1 connection error (message on stderr) · 2 server error (JSON {error: {code, message}} on stderr).

Subcommands

Starting an application

run is the odd one out: it does not connect to a Runtime, it starts an application with one inside. Its options configure that Runtime, so they come after run, and everything after -- goes to the application unchanged.

bash
vericue run ./your-qt-app
vericue run --port 4242 ./your-qt-app -- --config prod.ini
vericue run --check ./your-qt-app        # compatibility report, no launch

Linux x64 and Windows x64; on other platforms it says so and points at embedding. Full guide: Running an application.

Protocol

bash
vericue ping
vericue version
vericue echo "round trip"

Discovery

bash
vericue find_object --path "MainWindow/okButton"
vericue find_object --object-name okButton
vericue find_object --class-name QPushButton
vericue list_objects --class-name QPushButton --root "MainWindow"
vericue get_properties MainWindow/okButton --properties text,enabled
vericue get_object_tree --root MainWindow --depth 2

# What this element supports - signals, invokable methods, properties.
# --own drops the QObject members every object carries.
vericue get_meta MainWindow/okButton --own

Interaction

bash
vericue mouse_click MainWindow/okButton --button left
vericue mouse_click MainWindow/fileList --double
vericue type_text MainWindow/nameEdit "Jane Doe"
vericue key_press MainWindow/nameEdit enter
vericue key_press MainWindow/editor "ctrl+s" --repeat 1
vericue drag MainWindow/slider 10 10 200 10 --button left

Screenshots & visual verification

bash
vericue screenshot --output shot.png                # omit --output to get base64 JSON
vericue screenshot --path MainWindow/chartView --output chart.png
vericue highlight_object MainWindow/okButton --duration 2000 --color red

vericue save_baseline baseline.png --path MainWindow
vericue screenshot_compare --baseline baseline.png --threshold 0.02 --diff-output diff.png

Touch & gestures

bash
vericue touch_tap MainWindow/listView --x 50 --y 100 --duration 50
vericue touch_long_press MainWindow/item --duration 800
vericue swipe MainWindow/listView 150 400 150 100 --duration 300 --steps 10
vericue pinch MainWindow/imageView 50 200 --center-x 160 --center-y 120

Model/view data

bash
vericue get_model_info MainWindow/tableView
vericue get_model_data MainWindow/tableView --row 0 --column 1
vericue get_model_data MainWindow/tableView --start-row 0 --end-row 9 --role display

Automation & waiting

bash
vericue set_property MainWindow/nameEdit text '"Jane"'   # value parsed as JSON, falls back to string
vericue wait_for_signal MainWindow/worker "finished()" --timeout 10000

Recording

bash
vericue start_recording
# ...interact with the app by hand...
vericue stop_recording          # returns captured events + generated Python script

Interactive inspector

Requires pip install vericue[inspector]:

bash
vericue inspect                          # browse the live object tree
vericue inspect --root MainWindow --depth 3

Raw commands

send reaches any protocol command, including ones without a dedicated subcommand. Values are parsed as JSON when possible:

bash
vericue send memory_snapshot
vericue send frame_time --param duration_ms=2000
vericue send subscribe_signal --param path=MainWindow/okButton --param 'signal=clicked()'

Scripting example

bash
#!/usr/bin/env bash
set -euo pipefail

# Fail the deploy smoke-test if the app doesn't come up healthy.
vericue --port 4242 ping >/dev/null
text=$(vericue --port 4242 get_properties MainWindow/statusLabel --properties text \
       | python -c 'import json,sys; print(json.load(sys.stdin)["text"])')
[ "$text" = "Ready" ] || { echo "App not ready: $text"; exit 1; }

Released under a commercial licence. Privacy · Terms