LiveTest API
LiveTest is the runtime control surface for real Fission hosts. It lets tests and manual QA drive the current frame without calculating coordinates by hand. Native hosts expose /health and /cmd; Web test builds expose the same command contract through Chromium.
Enable the server by launching an app with FISSION_TEST_CONTROL_PORT.
FISSION_TEST_CONTROL_PORT=9876 cargo run -p counter
Then check readiness:
curl -s http://127.0.0.1:9876/health
Command shape
All commands go to POST /cmd with JSON.
curl -s http://127.0.0.1:9876/cmd -H 'content-type: application/json' -d '{"cmd":"GetTree"}'
Prefer LiveTestClient in Rust tests and curl for quick manual QA or screenshot capture.
For Web, build and serve the application with fission test --target web, or set FISSION_WEB_TEST_CONTROL=1 on the command that compiles the WASM application, then connect to the served URL. This is a compile-time switch: setting it only while serving the already-built files or while running the Rust browser test does not install the bridge. Rebuild the WASM output after changing it.
FISSION_WEB_TEST_CONTROL=1 ./platforms/web/build-wasm.sh
Ordinary production Web builds deliberately omit globalThis.__FISSION_TEST__.
Then use the browser client:
use fission_test_driver::{BrowserTestOptions, LiveTestClient};
let client = LiveTestClient::launch_browser(
BrowserTestOptions::new("http://127.0.0.1:8123/platforms/web/")
.fission_canvas(),
)?;
client.pump()?;
client.assert_text_visible("Ready")?;
Web screenshots are composited Chromium page captures. The initial driver does not claim Firefox/WebKit coverage or trusted browser clipboard, file, accessibility, and IME event coverage.
Selector-driven actions
curl -s http://127.0.0.1:9876/cmd -H 'content-type: application/json' -d '{"cmd":"TapSelector","query":{"selector":{"kind":"semantic_identifier","identifier":"settings.save"}}}'
Selectors can target semantic identifiers, explicit widget ids, labels, role plus label, test/accessibility identifiers, duplicate indexes, and scopes.
Screenshots
curl -s http://127.0.0.1:9876/cmd -H 'content-type: application/json' -d '{"cmd":"Screenshot","path":".artifacts/manual/settings.png"}'
Use Screenshot to save a file on the app host. Use CaptureScreenshot when the caller needs the PNG bytes returned as base64 for a custom QA tool. Screenshots are used for visual QA, store assets, and golden comparisons.