rightkit_qa/lib.rs
1//! rightkit-qa: the Rust QA harness for Right Suite apps (macOS and Windows).
2//!
3//! This crate and the Node packages `@rightkit/qa` / `@rightkit/qa-chrome` are two runners
4//! that coexist; neither replaces the other. This one drives native Rust, Tauri and engine
5//! targets (the real macOS app, the Windows WebView2 app through its in-app control server,
6//! the engine) with no Node or Python runtime. The Node packages own browser-page QA
7//! (Chrome for Testing plus a CDP page driver, evidence, pane/frame/paint checks). See the
8//! ownership table in this crate's README.
9//!
10//! Targets:
11//! * engine: [`engine::EngineTarget`] drives the app engine over CLI words and the
12//! framed stdio sidecar.
13//! * app UI: [`control::Control`] launches the real Tauri app hidden/backgrounded
14//! and drives it through the in-app server (`embedded`, feature `control`).
15//! * Chrome: `browser` feature, through `rightkit-browser`.
16//! * Android: `android::AndroidSession` (feature `android`) installs and launches the dev APK on an
17//! emulator or USB device through `adb`, records logcat by pid, and forwards the in-app control
18//! server to a loopback port.
19//!
20//! Scenarios are declarative TOML ([`scenario`]) run by the CLI, or plain Rust
21//! integration tests wrapped by [`harness::Harness::scenario`] (tier gating, requires-skip,
22//! per-scenario evidence, orphan check). Knobs reach managed (`rightkit cargo`) test runs
23//! through cargo features plus a [`settings::Settings`] file, never the caller's environment.
24//!
25//! Run kinds and evidence: a run is `functional` (the default: clicks, state and text, no
26//! screenshots, no recordings) or `visual` (the audit-visual run that captures screens), see
27//! [`storage::RunKind`]. Each run writes into its own directory under the managed runs root and
28//! [`retention`] prunes only directories that carry the run marker.
29//!
30//! Validators: [`media`] (WAV stats, PNG/frame non-uniformity) and [`loudness`]
31//! (BS.1770 integrated loudness, range, true peak), pure Rust except where a compressed
32//! container needs a caller-supplied ffmpeg. [`mock::MockServer`] stands in for paid providers.
33/// Accessibility evidence for UI scenarios: contrast, focus indicator, role/name assertions.
34pub mod a11y;
35/// Android journeys through `adb` (emulator or USB device); feature `android`.
36#[cfg(feature = "android")]
37pub mod android;
38#[cfg(all(feature = "control", not(debug_assertions)))]
39compile_error!("rightkit-qa control surface cannot be built without debug assertions");
40pub mod audio;
41pub mod binary;
42#[cfg(feature = "browser")]
43pub mod browser;
44pub mod check;
45pub mod config;
46pub mod control;
47/// QA-only in-app control server. Compiled only with the explicit `control` feature AND debug
48/// assertions (dev builds, installed dev builds included); a release build cannot carry it.
49#[cfg(all(feature = "control", debug_assertions))]
50pub mod embedded;
51pub mod engine;
52pub mod evidence;
53pub mod frametrace;
54pub mod guard;
55pub mod harness;
56pub mod http;
57/// Tier-2 `InApp` client for the embedded control server (`control` feature, debug builds only).
58#[cfg(all(feature = "control", debug_assertions))]
59pub mod in_app;
60pub mod inplace;
61pub mod installed;
62/// Run a journey in the logged-on user's interactive session from a session-0 (SSH) process.
63pub mod interactive;
64pub mod lock;
65pub mod loudness;
66pub mod media;
67pub mod mock;
68pub mod page;
69pub mod process;
70pub mod retention;
71pub mod scenario;
72pub mod settings;
73pub mod storage;
74pub mod suite;
75pub mod tart;
76pub mod userdata;
77pub mod util;
78pub mod workspace;
79
80pub use util::{Error, Result};