Expand description
Test assertion helpers for AI-agent and CI testing of Tauri apps via Victauri.
This crate provides a typed HTTP client for the Victauri MCP server, plus assertion helpers for common test patterns: DOM checks, IPC verification, state comparison, accessibility audits, and performance budgets.
§Quick Start
ⓘ
use victauri_test::VictauriClient;
#[tokio::test]
async fn app_loads_correctly() {
let client = VictauriClient::connect(7373).await.unwrap();
// Check the page title
let title = client.eval_js("document.title").await.unwrap();
assert_eq!(title.as_str(), Some("My App"));
// Verify no accessibility violations
let audit = client.audit_accessibility().await.unwrap();
assert_eq!(audit["summary"]["violations"], 0);
// Check IPC health
let integrity = client.check_ipc_integrity().await.unwrap();
assert_eq!(integrity["healthy"], true);
}Structs§
- Victauri
Client - Typed HTTP client for the Victauri MCP server.
Enums§
Functions§
- assert_
ipc_ healthy - Assert that IPC integrity is healthy (no stale or errored calls).
- assert_
json_ eq - Assert that a JSON value at the given pointer equals the expected value.
- assert_
json_ truthy - Assert that a JSON value at the given pointer is truthy (not null/false/0/“”).
- assert_
no_ a11y_ violations - Assert that an accessibility audit has zero violations.
- assert_
performance_ budget - Assert that all performance metrics are within budget.
- assert_
state_ matches - Assert that state verification passed with no divergences.