Expand description
rightkit-qa: the Rust QA harness for Right Suite apps (macOS and Windows).
Replaces @rightkit/qa (embedded-WebDriver launch, run lock, evidence, guard,
frames/paint/panes) and the Node e2e harness pattern (tests/e2e/lib.mjs,
ui.mjs, scripts/e2e.mjs). Everything is Rust; no Node or Python runtime.
Targets:
- engine:
engine::EngineTargetdrives the app engine over CLI words and the framed stdio sidecar. - app UI:
control::Controllaunches the real Tauri app hidden/backgrounded and drives it through the in-apprightkit-controlserver. - Chrome:
browserfeature, throughrightkit-browser.
Scenarios are declarative TOML (scenario) run by the CLI, or plain Rust
integration tests that use the same library types directly.
Re-exports§
Modules§
- audio
- Audio is always muted during QA. Apps are told through
RIGHTKIT_QA_MUTE=1and Chrome gets--mute-audio; on macOS the system output can additionally be muted for the run and restored afterwards (opt-in, restored on drop). Playback is asserted from DOM/engine state, never from sound. - check
- Assertions over a step’s JSON result: a small path syntax (
a.b[0].c,list[*].name) plus value predicates, and${...}interpolation of saved results into later steps. - config
- Per-app config:
rightkit-qa.toml, the TOML replacement forright-qa.config.mjs. - control
- Drive the real Tauri app through the in-app
rightkit-controlserver. - engine
- Black-box driving of an app’s engine binary: one-shot CLI words and the
framed stdio sidecar protocol (newline-delimited JSON through
rightkit-framed-sidecar). Nothing mocks the engine. - evidence
- A receipt that names a file without hashing it is a claim, not evidence. Every artifact is hashed when recorded, a check may only reference hashed artifacts, and the bundle can be re-verified against the filesystem.
- guard
- The guard that keeps the in-app QA control surface out of production builds.
- http
- Minimal blocking HTTP/1.1 client over loopback
TcpStream. Every call has an explicit deadline: a request that never answers is a failed step, not a hang. - lock
- Run lock: one QA run per lock directory. A lock is reclaimed only when its owner is
provably gone (pid dead, or the pid now belongs to a different process); a live owner is
never displaced however long its run takes. Age applies only to a lock directory that
never received an owner record (a crash between
mkdirand the owner write). - media
- Content validators for generated artifacts: a file existing is not a result. Pure Rust for WAV/PNG; ffprobe/ffmpeg only where decoding is genuinely needed.
- mock
- Local HTTP mock for PAID providers: paid-tier scenarios assert the exact requests the product would send, and never make a billed call.
- page
- Page-side QA primitives that run through
Control::eval(or any evaluator): frame-scoped selectors, painted-not-acknowledged timing, and active-pane geometry. These port theframes,paint, andpanesmodules of the TS package; the scripts are plain function bodies (return ...). - process
- Owned processes: every child is spawned through
rightkit-process(process group / Job Object), registered with aTracker, and killed by recorded pid only. Nothing here ever matches processes by name for killing. - scenario
- Declarative scenarios (
*.scenario.toml) and the step executor. - suite
- A QA run: select scenarios by tier, take the run lock, create the isolated workspace, run scenarios sequentially, sweep orphans, and write hashed evidence.
- util
- Shared error type and small helpers.
- workspace
- An isolated, reliably removable home for one QA run: own data dir (so the app takes its own single-instance lock), own evidence dir, retrying disposal that reports what it could not remove, and a sweep for crashed runs.