Discover bugs. Forge deterministic tests. Prevent regressions.
TraceQA opens your web page in real browsers, finds every control a person can use,
and gives each one an ID that stays the same across browsers, screen sizes and builds.
See it in action · Features · Architecture · Install · Docs
Every web test starts with the same question: what is on this page, and how do I reach it? Usually someone clicks through the page in one browser, copies selectors by hand, and the tests break the next time the page or the browser changes.
TraceQA answers that question for you. Give it a URL, and it loads the page in Chromium, Firefox, WebKit, Safari or a WebDriver grid, at every screen size you ask for. It scrolls the whole page, reads inside frames and shadow DOM, and lists everything a person can interact with: buttons, links, fields and widgets, each with its role, accessible name, state and a ready-to-use Playwright locator.
The key step comes next. Repeated elements are grouped into components, and each component gets an ID that does not change across browsers, screen sizes and runs. A page becomes data you can diff, gate, test and hand to an AI.
|
Accessibility and quality checks attached to real components: unnamed controls, fake buttons, tiny targets, browsers that disagree, plus axe-core. |
Playwright page objects in TypeScript or Python, generated from what the page actually contains. When the page
changes, |
Save a baseline, compare every build against it, and fail the pull request when a control disappears, gets disabled or gets covered. |
Note
TraceQA is pre-1.0. The command line and the file formats are versioned and may still change.
The repository ships a demo shop full of deliberate bugs. One command reads it in three browser engines at desktop and phone sizes:
$ traceqa extract http://127.0.0.1:4173/ --browser chromium,firefox,webkit --viewport 1280x800,390x844
TARGET STATUS COMPONENTS INSTANCES WARNINGS TIME
chromium-1280x800 completed 37 67 1 14.3s
chromium-390x844 completed 37 67 1 14.3s
firefox-1280x800 completed 37 67 1 23.5s
firefox-390x844 completed 37 67 1 23.5s
webkit-1280x800 completed 37 67 1 7.2s
webkit-390x844 completed 37 67 1 7.1sSix browser and size combinations find the same 37 components, with the same IDs. Run the checks on the result:
$ traceqa findings runs/r_20261025_202132_e41c
chromium-1280x800: 3 errors, 2 warnings, 1 info
SEVERITY RULE COMPONENT ROLE NAME FINDING
error unnamed-control c_22db864e0a14 button A button has no accessible name, so a screen reader announces it without saying what it does.
error fake-button c_015589123eaf generic Dismiss This element acts like a button (a pointer cursor or a click handler) but is not a button or link and cannot be reached with the keyboard.
error fake-button c_cf32bca1f4ff generic See today's offers This element acts like a button (a pointer cursor or a click handler) but is not a button or link and cannot be reached with the keyboard.
warning small-target c_1d776447f7e3 button कार्ट देखें The target is 62.1x23 CSS pixels, below the 24x24 minimum, and sits close to other targets.
warning small-target c_38a4abbc53b5 link تواصل معنا The target is 76.5x21 CSS pixels, below the 24x24 minimum, and sits close to other targets.
info missing-autocomplete c_7e3842decc6b textbox Email address This email field has no autocomplete attribute, so browsers and assistive tools cannot fill it in for the person.Then turn the result into a page object (traceqa codegen runs/r_20261025_202132_e41c --lang ts):
// traceqa:id c_663c9dccbb31
// role: "button", name: "Search"
get searchButton(): Locator {
return this.page.getByRole("button", { name: "Search", exact: true });
}
// traceqa:id c_22db864e0a14
// role: "button", name: ""
get button_22db86(): Locator {
return this.page.locator("#cart-btn");
}The unnamed cart button is c_22db864e0a14 in every browser, at every size, in every run. When a later build
fixes it, or breaks something else, traceqa diff reports exactly which component changed.
|
|
|
|
|
|
|
|
The full list, one line per feature, is in docs/features.md.
Testing tools usually make you choose. Hand-written scripts are precise but break whenever the page changes. AI agents adapt to change, but they rarely do the same thing twice. TraceQA starts from a different idea: a web page can be read as data. Once every component has a stable identity, exploring, judging, testing and gating all become repeatable and explainable.
| The usual way | The TraceQA way |
|---|---|
| Record clicks in one browser and get selectors for whatever you happened to touch. | Read the whole page in every browser and get a locator for everything, without clicking anything. |
| Compare screenshots pixel by pixel: a new font fails the build, and a missing button is lost in the noise. | Compare components: added, removed, renamed, disabled, hidden or covered. Pixel compare is optional and per component. |
| Run accessibility rules and get a list of DOM nodes that shifts with every build. | Findings are attached to component IDs, so you can track, suppress and gate them across builds. |
| Let an AI agent click around, and get something different every run. | Same page, same IDs, every run. AI tools get structured, deterministic data over MCP. |
| Run one browser at a time and glue the results together with scripts. | Run Chromium, Firefox, WebKit, Safari and grids side by side in one run, and compare them by component. |
Four principles hold it together:
- Deterministic. The same page gives the same components and the same IDs.
- Read-only by default. It observes the page and never changes anything on it.
- One brain. The Rust engine makes every decision. Drivers only carry out instructions, so every browser is treated the same.
- Contracts first. Every message and file is defined by a JSON Schema, and the Rust and Python types are generated from those schemas, so the languages cannot drift apart.
TraceQA is a small set of programs that exchange messages. The engine, a single Rust binary, makes every decision. Browser drivers are separate Python processes that do what they are told. A plain JavaScript file runs inside the page and reports facts.
flowchart TB
cli["traceqa CLI"]
ai["AI tools<br/>over MCP"]
lang["Any language<br/>via traceqa serve"]
subgraph engine["Rust engine"]
direction LR
orchestrate["Orchestrate<br/>browsers x viewports"] --> group["Group and fingerprint<br/>stable component IDs"] --> analyse["Diff, findings, verify,<br/>codegen, heal, visual"]
end
subgraph drivers["Python drivers"]
direction LR
pw["Playwright driver"]
wd["WebDriver driver"]
end
subgraph browsers["Real browsers"]
direction LR
b1["Chromium, Chrome, Edge,<br/>Firefox, WebKit, CDP"]
b2["Safari,<br/>WebDriver grids"]
end
runs[("Run folder<br/>run.json, events.jsonl,<br/>components.json, crops")]
cli --> engine
ai --> engine
lang -->|JSON-RPC over stdio| engine
engine <-->|JSON-RPC over stdio| drivers
pw --> b1
wd --> b2
engine --> runs
Every message between these programs, and every file they write, is defined once as a JSON Schema in
spec/. The CLI and the MCP server call the engine directly. Everything else talks to it in JSON-RPC,
one message per line.
For every browser at every viewport:
sequenceDiagram
participant E as Engine
participant D as Driver
participant B as Browser
E->>D: session.open (browser, viewport)
D->>B: launch
E->>D: page.goto (url)
D->>B: load, then wait for a quiet network, a stable height and finished animations
E->>D: page.scroll
D->>B: scroll a screen at a time, so lazy content appears
E->>D: page.eval (page-script.js, in every frame)
B-->>D: role, name, state, box and path of each element
D-->>E: facts only
Note over E: merge frames into page coordinates,<br/>group elements into components,<br/>hash role + name + path into a c_ ID
E->>E: write components.json and events.jsonl
E->>D: session.close
flowchart LR
extract["traceqa extract"] --> run[("run folder")]
run --> findings["traceqa findings"]
run --> diff["traceqa diff<br/>--against main"]
run --> codegen["traceqa codegen"]
codegen --> pages["Playwright<br/>page objects"]
baseline[("baseline<br/>main")] --> diff
findings --> gate{"CI gate"}
diff --> gate
gate -->|clean| merge["Merge"]
gate -->|unintended change| fail["Pull request fails"]
gate -->|intended change| promote["traceqa baseline promote<br/>makes it the new baseline"]
Repository map
| Path | What lives there |
|---|---|
crates/traceqa-cli |
The traceqa binary, one module per command. |
crates/traceqa-engine |
All the logic: orchestration, grouping and component IDs. |
crates/traceqa-common |
Types generated from spec/, the JSON-RPC line format and shared helpers. |
crates/traceqa-recorder |
Writes the run folder and the live event stream. |
crates/traceqa-diff |
Compares two runs by component ID. |
crates/traceqa-findings |
The accessibility and quality checks. |
crates/traceqa-heal |
Sorts what a run lost against a baseline into fixes, renames and failures. |
crates/traceqa-visual |
Compares component pictures pixel by pixel. |
crates/traceqa-mcp |
The MCP server for AI tools. |
crates/traceqa-replay |
A stand-in engine that replays recorded conversations, for testing clients. |
page-script |
page-script.js, which runs inside the page and reports what it finds. |
web-drivers |
The Playwright and WebDriver drivers, and traceqa-protocol, their shared generated types. |
spec |
JSON Schemas for every message and file, with examples, transcripts and the ID recipe. |
testbed |
Demo sites, including the buggy shop, and the end-to-end bench. |
tests |
End-to-end, driver, MCP and installer tests. |
scripts |
Code generation and CI helpers. |
The full design, including both protocols and the reasons behind each decision, is in docs/architecture.md.
One line. The installer downloads the newest release
for your system, checks it against the release's SHA256SUMS.txt, puts traceqa in ~/.local/bin and adds
that folder to your PATH.
# Linux and macOS
curl -LsSf https://raw.githubusercontent.com/thearpankumar/TraceQA/master/scripts/install.sh | sh# Windows
irm https://raw.githubusercontent.com/thearpankumar/TraceQA/master/scripts/install.ps1 | iexPin a version with | sh -s -- --version v0.1.0, choose the folder with --install-dir, and keep your shell
profile untouched with --no-modify-path. The options and their environment variables are listed at the top of
install.sh and install.ps1.
By hand. Each release has archives for Linux x86-64, macOS on Apple silicon and Windows x86-64, a
SHA256SUMS.txt, and signed build provenance you can check:
gh attestation verify traceqa-v0.1.0-linux-x86_64.tar.gz --repo thearpankumar/TraceQAFrom source, with Rust 1.88 or later and GNU make (Git Bash on Windows):
git clone https://github.com/thearpankumar/TraceQA
cd TraceQA
make installmake install builds the checkout, copies traceqa to /usr/local/bin (asking for sudo only for that copy;
make install PREFIX=$HOME/.local needs none), and installs the drivers and browsers from the checkout. Without make,
cargo install --path crates/traceqa-cli --locked builds and installs the binary alone.
TraceQA needs uv, which it uses to set up its drivers in ~/.traceqa, away from
your own projects:
traceqa install chromium firefox webkit
traceqa doctordoctor checks the setup and says how to fix anything that is missing. On Linux, add --with-deps to install
the browsers' system libraries. make install already did this step.
traceqa extract https://example.com --browser chromium,firefox --viewport 1280x800,390x844
traceqa findings runs/<run-id>
traceqa codegen runs/<run-id> --lang tsclaude mcp add traceqa -- traceqa mcpOther MCP clients start the program traceqa with the argument mcp.
traceqa baseline save runs/<run-id> --name main
traceqa diff runs/<new-run-id> --against main --fail-on removed,disabled --format githubA complete GitHub Actions job is in docs/usage.md.
| Document | Read it for |
|---|---|
| Usage | Every command, option, exit code and output file. |
| Features | Everything TraceQA can do, one line each. |
| Architecture | How the engine, drivers and page script fit together, and why. |
| Clients | Driving the engine from any language with traceqa serve. |
| Testing | Mutation testing of the component ID and checks of the generated page objects. |
| Backlog | Designed but not built yet: the explorer, interaction oracles and more. |
| Contracts | The JSON Schemas, their versions and the rules for changing them. |
| Component IDs | The exact ID recipe and its known limits. |
| Security | How to report a vulnerability privately. |
| Third-party notices | Licences of the code TraceQA ships. |
Set up the repository (needs Rust stable and uv):
cargo build
uv sync
uv run playwright install chromium firefox webkitRun the tests: the Rust crates, then the Python suites, then the end-to-end bench on the demo shop:
cargo test
uv run pytest
uv run testbed/bench/run.pyRun the linters:
uv run ruff check .
uv run ruff format --check .
uv run pyrightStart the demo shop at http://127.0.0.1:4173/ to try the commands above:
uv run python testbed/sites/buggy-shop/serve.pyEvery command works unchanged in Bash, PowerShell and cmd. CI runs the tests on Linux, macOS and Windows.
With GNU make (Git Bash on Windows), make setup, make test, make lint and make ci run the same commands,
make build puts a release binary in bin/, and make lists every target. The devcontainer
has Rust, uv, Node and the three browsers ready: open the folder in VS Code and choose Reopen in Container, or
run make devcontainer.
Please report vulnerabilities privately, as described in docs/SECURITY.md.
TraceQA is licensed under the Apache License 2.0. Third-party licences are listed in docs/third-party-notices.md.