QA developer utilities#
Hands-on, standalone tools a developer runs during implementation to drive a
connected Kleidos device over the serial debug console — capture screens, record
video, watch live resources, and seed test data. They are deliberately separate
from the automated pytest suite (qa/tests/): pytest is for repeatable
pass/fail gates, these are for interactive inspection while you iterate.
All three require a device flashed with a *_debug build (the debug serial
console, DEBUG_SERIAL_BUTTONS) and talk to it over the USB serial port.
These are dev-loop utilities, not tests. For automated QA (native + HIL, markers, Allure) use the pytest system — see
docs/testing/qa-system.md. The reusable capture/parse logic these tools pioneered now also lives, ported, inqa/qa_lib/for the pytest layer.
Tools#
| Tool | Purpose |
|---|---|
serial_screenshot.py |
Capture framebuffer screenshots (RGB565 → PNG) and record video (KVID stream) from the device over serial. The primary screen/video capture utility. |
resource_monitor_tui.py |
Live, Keil-µVision-style terminal dashboard of on-device resources (heap, tasks, timing) streamed over serial. |
seed_credentials.py |
Quickly provision test credentials into the vault over the serial debug console, so you don't hand-enter data each iteration. |
Usage#
Each tool is self-documenting; run with --help for the full flag set. Common
invocations (adjust --port to your device — the MAC is the reliable identity;
see qa/inventory/devices.yaml):
# One screenshot to a PNG
python3 qa/tools/serial_screenshot.py --port /dev/ttyACM0 -o screen.png
# Record device video while you exercise the UI
python3 qa/tools/serial_screenshot.py --port /dev/ttyACM0 --video
# Live resource dashboard
python3 qa/tools/resource_monitor_tui.py --port /dev/ttyACM0
# Seed test credentials
python3 qa/tools/seed_credentials.py --port /dev/ttyACM0
Safety#
- Debug builds only. These drive the debug serial console; they do nothing
useful against a
_release/_securebuild (and must never be pointed at a_securedevice). - No secrets in the repo.
seed_credentials.pyprovisions test data only — never commit real credentials, and never pass real PINs/passphrases on a command line that lands in shell history.