Guide¶
The guide walks through using Spectre end-to-end:
- Installation — how to consume Spectre while it's pre-release.
- Getting started — write your first test against a Compose Desktop window.
- The automator — the mental model: surfaces, the semantics tree, queries vs. interactions, and why there's no auto-wait.
- Finding nodes — selector reference.
- Driving input — clicks, swipes, scrolling, typing, screenshots.
- Synchronization — wait helpers and the EDT rule.
- JUnit integration —
ComposeAutomatorExtension(JUnit 5) andComposeAutomatorRule(JUnit 4). - Running on CI — JVM flags,
xvfb, macOS helper JVMs, and recording tags. - Recording and screenshots — region capture, window-targeted video, and native still-window screenshots.
- Cross-JVM access — driving a UI hosted in another JVM.
- Agent attach — attach to a running Compose JVM (preinstalled core or inject).
- Capability matrix — ops × transports × platforms, with fail-closed CI evidence for every Supported cell.
- CLI — interactive
spectrecommand and MCP server. - Atomic capture — window PNG + versioned tree for agents.
- Compose Hot Reload — optional reload settle wait and key invalidation when the target runs under HR (CLI/MCP only).
- IntelliJ-hosted Compose — Jewel-on-IntelliJ tool windows.
- Troubleshooting — platform-specific gotchas.
If you're new to Spectre, start with Installation and Getting started, then read The automator before dipping into the per-topic pages.