victauri-test
Test assertion helpers for AI-agent and CI testing of Tauri apps via Victauri.
What It Does
Provides a typed HTTP client for the Victauri MCP server plus assertion helpers for common test patterns:
- DOM checks — JSON pointer assertions on snapshots
- IPC verification — integrity and ghost command detection
- State comparison — cross-boundary frontend/backend verification
- Accessibility audits — WCAG violation assertions
- Performance budgets — load time and heap size guards
Quick Start
Add to your test dependencies:
[]
= "0.1"
= { = "1", = ["rt-multi-thread", "macros"] }
Write a test:
use ;
use json;
async
Authentication
If the Victauri server requires a Bearer token:
let mut client = connect_with_token.await.unwrap;
Assertion Helpers
| Function | What It Checks |
|---|---|
assert_json_eq(value, pointer, expected) |
JSON pointer equals expected value |
assert_json_truthy(value, pointer) |
JSON pointer is truthy (not null/false/0/"") |
assert_no_a11y_violations(audit) |
Accessibility audit has zero violations |
assert_performance_budget(metrics, max_load_ms, max_heap_mb) |
Load time and heap within budget |
assert_ipc_healthy(integrity) |
No stale or errored IPC calls |
assert_state_matches(verification) |
Frontend/backend state verification passed |
License
Apache-2.0