Expand description
Integration testing for Tauri apps via the Victauri MCP server.
Provides TestApp for managed app lifecycle and VictauriClient with
Playwright-style interactions (click_by_text, fill_by_id, expect_text)
plus assertion helpers for accessibility, performance, and state verification.
§Quick Start
ⓘ
use victauri_test::TestApp;
#[tokio::test]
async fn greet_flow() {
let app = TestApp::spawn("cargo run -p my-app").await.unwrap();
let mut client = app.client().await.unwrap();
client.fill_by_id("name-input", "World").await.unwrap();
client.click_by_id("greet-btn").await.unwrap();
client.expect_text("Hello, World!").await.unwrap();
}§Without TestApp (connect to existing server)
ⓘ
use victauri_test::VictauriClient;
#[tokio::test]
async fn check_health() {
let mut client = VictauriClient::discover().await.unwrap();
let audit = client.audit_accessibility().await.unwrap();
assert_eq!(audit["summary"]["violations"], 0);
}Re-exports§
pub use locator::Bounds;pub use locator::Locator;pub use locator::LocatorExpect;pub use locator::LocatorMatch;pub use smoke::SmokeCheckResult;pub use smoke::SmokeConfig;pub use smoke::SmokeReport;
Modules§
- coverage
- IPC coverage tracking — measures which Tauri commands are exercised by tests.
- locator
- Playwright-style composable element locators with actions, queries, and auto-waiting expectations.
- prelude
- Convenience re-exports for concise test imports.
- reporting
JUnitXML report generation for CI integration.- smoke
- Built-in smoke test suite for Victauri-powered Tauri apps.
- visual
- Visual regression testing — compare screenshots against baselines.
Macros§
- e2e_
test - Declare an E2E test that auto-skips when
VICTAURI_E2Eis not set and auto-connects to the running server.
Structs§
- Check
Result - A single check result — pass or fail with context.
- Memory
Stats - Structured process memory statistics returned by
VictauriClient::memory_stats. - Plugin
Info - Structured plugin information returned by
VictauriClient::plugin_info. - TestApp
- Managed Tauri application lifecycle for integration testing.
- Verify
Builder - Fluent assertion builder for full-stack Tauri test verification.
- Verify
Report - Collection of check results from a
verify()run. - Victauri
Client - Typed HTTP client for the Victauri MCP server.
- Wait
ForBuilder - Builder for configuring and executing a
wait_forcondition.
Enums§
- Test
Error - Errors that can occur when interacting with the Victauri MCP server from tests.
Functions§
- assert_
ipc_ called - Assert that a specific IPC command was called at least once.
- assert_
ipc_ called_ with - Assert that a specific IPC command was called with the given arguments.
- assert_
ipc_ healthy - Assert that IPC integrity is healthy (no stale or errored calls).
- assert_
ipc_ not_ called - Assert that a specific IPC command was NOT called.
- 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.
- connect
- Connect to a Victauri server using standard env var configuration.
- is_e2e
- Returns
trueif E2E tests should run (i.e.,VICTAURI_E2Eenv var is set).