Expand description
LLM-driven browser test framework.
Provides reusable building blocks for browser-based test scenarios:
- Browser client via Chrome
DevToolsProtocol (headless) - LLM client for natural language element targeting and assertions
- Declarative TOML scenario runner
#[browser_test]macros forcargo testintegration
Modules§
- runner
- Step-by-step scenario executor (navigate, click, type, wait, assert).
- scenario
- Declarative TOML-based test scenario types. Scenario types for human-readable browser test case definitions.
Structs§
- LlmConfig
- Configuration for the LLM client — bundles URL, model, auth, timeouts, and provider-specific options into a single struct passed everywhere.
Constants§
- DOM_
EXTRACT_ JS - JavaScript to extract interactive elements from the current page. Returns a JSON array of objects with tag, selector, and label.
Functions§
- base_
url - Returns the target base URL from
HARNESS_BROWSER_BASE_URLenv, defaulting tohttp://localhost:4200. - browser_
headless - Returns whether to run the browser in headless mode from
HARNESS_BROWSER_HEADLESSenv, defaulting totrue. - http_
client - Builds a
reqwest::Clientwith the given timeout. - llm_
base_ url - Returns the LLM server base URL from
HARNESS_LLM_TEST_URLenv, defaulting tohttp://localhost:8080. - llm_
chat - Sends a chat completion request to the LLM.
- llm_
model - Returns the LLM model name from
HARNESS_LLM_TEST_MODELenv, defaulting todeepseek. - truncate
- Truncates a string to the given maximum length, appending a marker if truncation occurred.