Cairn · Agentic testing
Agentic testing for browser applications
Cairn is an open-source TypeScript engine and CLI for testing web applications with AI agents. Describe a user flow, let AI discover browser actions, and save the steps and assertions as a reusable JSON test. Ordinary mechanical replay then runs without a model.
Updated November 6, 2026 · Based on Cairn 2.9.7 documentation
What is agentic testing?
Agentic testing uses an AI agent to help explore an application and perform test actions toward a goal. In Cairn, the agent discovers a browser flow; a saved scenario and explicit assertions make later regression checks repeatable. This tests a web application with an agent, rather than evaluating an AI model itself.
From a browser task to a regression test
Discover
Describe a flow such as signing in, submitting a form, or placing a synthetic order. A configured model observes the browser and selects actions.
Freeze
Save the discovered steps and assertions as a readable *.skill.json file. Review the assertions: reaching a page is not enough if the goal also requires a successful API response.
Replay
Execute the saved steps and mechanical checks in the browser. Basic replay uses zero model calls; browser execution and infrastructure still have their own costs.
Repair
Enable --heal explicitly when a UI change breaks a target. Save a repaired path only after verification succeeds. Application defects should remain failures.
When is Cairn useful?
Use Cairn to author repeatable login, form, or checkout checks from a task description, or embed cairn-engine in a QA tool or CI workflow. Supply success criteria that match your application. If you need exact handwritten browser logic, conventional scripted tests may be a better fit; Cairn does not remove the need to review test coverage.
App knowledge and execution budgets
Optional appContext gives discovery, exploration, and repair your app terminology and workflow rules. It is guidance, not evidence or proof of success. budget: { maxModelCalls, timeoutMs } shares limits across discovery and repair per run or suite case; separate top-level calls get separate budgets by default. Optional runWorkflow shares an allowance across participating engine calls and host work through borrowed leases. Deadlines use cooperative cancellation, not a hard kill or billing cap.
Questions about AI browser testing
Does every test run call an LLM?
No. Ordinary replay runs saved actions and mechanical assertions without a model. Discovery, opt-in repair, and optional semantic checks can call a model. Healthy mechanical replay needs neither appContext nor a model.
Can I try Cairn without an API key or model account?
Yes. The scripted quickstart supplies fixed responses while real Chrome discovers, saves, and replays a local form flow. It checks browser integration, not a real model’s ability to discover an unfamiliar app. Its README lists exact Node and Chrome requirements.
Does Cairn judge screenshots automatically?
Built-in critics judge execution and logic evidence. Optional evidenceCapture collects intermediate accessibility snapshots or screenshots for host checks; capture alone is not a pass. Screenshots are not automatically masked. A check with missing required evidence can be inconclusive.
Is the order demo a live AI service?
No. It shows recorded engine 2.9.2 executions of a synthetic order journey, not live model calls or a benchmark of the current release. Recording details disclose the evidence-retention limitation and reproduction steps.