Use case
QA & test automation
Author end-to-end tests as goals, run them deterministically, and replay every failure as session video.
The problem
What the status quo costs you.
End-to-end test suites are expensive to write and flaky to run. Selector churn breaks tests on every redesign, and when a run fails in CI you get a stack trace, not a recording of what the browser actually did. Maintaining the suite often costs more than the bugs it catches.
See how Twin works- Trigger scenario from CIdone
- Replay the compiled test skillrunning
- Capture durable session videoqueued
- Assert the expected outcomequeued
- Report pass / failqueued
The wedge
Compile once. Replay forever.
Twin lets you express a test as a goal, compiles it into a deterministic skill, and replays it the same way every time — so a pass is a pass and a failure is reproducible. Because skills plan over indexed DOM state rather than raw selectors, a cosmetic redesign doesn’t red-bar the suite. Every run is captured as live view plus durable session video, so a failure is a recording you can scrub, not a guess.
- 1Write each scenario as a natural-language goal; Twin compiles it into a replayable skill.
- 2Run skills deterministically in CI via the REST API with a Bearer key — no flaky LLM-on-every-step loop.
- 3A redesign shifts the indexed DOM map; intent-matched steps survive cosmetic churn instead of snapping on selectors.
- 4Every run records to durable session video and real-time live view for instant triage.
- 5Authenticated test accounts live in the credential vault, so login flows are covered without secrets in your test code.
Outcome · A flaky, selector-bound suite becomes a set of intent-driven skills that survive redesigns, with every failure reproducible from session video — illustratively cutting test-maintenance churn while keeping per-run cost low through deterministic replay.
In practice
The actual call, and what it returns.
Compile the scenario once, then replay it from CI. A replay executes a stored path — no planner, no model in the loop — so the same test produces the same steps.
# 1 — compile the scenario once (discover, then minimize the path).
curl https://twin-browser.com/api/v1/skills \
-H "Authorization: Bearer $TWIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "target": "https://staging.example.com",
"goal": "buy the sample product with the test card",
"as": "checkout-happy-path" }'
# 2 — replay it from any CI runner that can hold a Bearer key.
curl https://twin-browser.com/api/v1/skills/checkout-happy-path/run \
-H "Authorization: Bearer $TWIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "target": "https://staging.example.com", "account": "test-account" }'
# → 200 { "success": true, "steps": 7, "runId": "…", "credits_charged": 1 }
#
# the recording of that exact session: GET /api/v1/runs/{runId}/videoWhat this call does
- Compile is the expensive call (a discovery pass); every replay after it is the flat replay rate.
- A replay binds its inputs per call — params, vault secrets, and the account session — so one skill covers every test account.
- The run id in the reply is the handle for the video, so a red build links to the session that failed.
- Unresolved parameters fail loudly before anything is charged, rather than typing a literal placeholder onto a live page.
Under the hood
The machinery under every run.
Every use case runs on the same primitives: a token-efficient view of the page, deterministic replay, and a checkpoint where a person decides.
Semantic dispatch cache
Re-phrased requests fuzzy-match a skill you already compiled, so they skip the planner LLM entirely.
Read the mechanism — Semantic dispatch cacheDeterministic replay
Matched skills replay the same way every time — a pass is a pass, and the marginal cost trends toward zero.
Read the mechanism — Deterministic replayToken-efficient DOM state
A live page becomes a compact, numerically-indexed map of interactive elements instead of raw HTML.
Read the mechanism — Token-efficient DOM stateHuman-in-the-loop handoff
Blocked steps — approvals, MFA on an authorized flow — pause for a person, then resume cleanly.
Read the mechanism — Human-in-the-loop handoffFAQ
QA & test automation on Twin — common questions.
Is Twin a replacement for Playwright or Cypress?
How do I debug a failed test run?
Can tests run in CI?
Related
More ways teams use Twin.
AI agents
Give your AI agent a real browser it can drive — reach any site, act under your guardrails, and let repeated work replay at near-zero cost.
Internal workflow automation
Automate the internal tools and vendor portals that have no API — with audit logging and human approval built in.
Accessibility automation
Drive web tasks on a user’s behalf and audit pages for accessibility — over a token-efficient view of the live DOM.
Put qa & test automation on autopilot.
Start free, hand your agent the work under your guardrails, and let the runs you repeat replay from a compiled skill.