---
title: "PiperTest: Self-Healing Browser Tests on Mac"
description: "Record browser tests visually using Chrome's real accessibility tree. Self-heal broken selectors automatically. Export to Playwright or Cypress. Free, local, no vendor lock-in."
type: "feature"
canonical: "https://modelpiper.com/pipertest/"
---

# PiperTest: Self-Healing Browser Tests on Mac

> Record browser tests visually using Chrome's real accessibility tree. Self-heal broken selectors automatically. Export to Playwright or Cypress. Free, local, no vendor lock-in.

**Free**

## Browser tests that heal themselves.

Record tests visually. Self-heal broken selectors. Export to Playwright or Cypress. All running locally on your Mac.

End-to-end tests are the most valuable tests a team can write and the ones they write least. CSS selectors break on every refactor. Enterprise tools charge $450+/month for self-healing. PiperTest queries Chrome's real accessibility tree, heals broken selectors in 5-15ms with zero external calls, and exports clean code for your CI pipeline. No cloud dependency, no seat-based pricing, no vendor lock-in.

- [Download ToolPiper](https://modelpiper.com/download)
- [Read the deep dive](/workflows/ai-testing)

## Why AX-Native Testing?

Every major testing tool targets the DOM, which is a build artifact. PiperTest targets the accessibility tree, which represents what users actually see.

#### Real Accessibility Tree

PiperTest queries Chrome's native AX tree via CDP's Accessibility.queryAXTree. Not a DOM simulation, not injected JavaScript scanning every element. The actual computed accessibility tree that screen readers consume.

#### Self-Healing Selectors

Three healing modes: passive quality improvement upgrades weak selectors silently, AX fuzzy matching resolves breaks in 5-15ms locally, and AI-assisted healing handles the rest. Enterprise-grade healing, zero enterprise pricing.

#### Framework-Proof

A React-to-Vue migration doesn't touch the AX tree if the UI looks and behaves the same. CSS refactors, component library swaps, build tool upgrades — none of it breaks AX selectors. Tests break when behavior changes, which is exactly when they should.

## Everything You Need

Full testing toolkit built on raw CDP. No wrappers, no abstractions, no compromises.

#### Visual Recording

Browse your app normally. Every interaction becomes an AX-enriched test step with element metadata, page context, and a mutation diff showing what changed. No annotation, no code, no switching between panels.

#### 7 Assertion Types

Visible, hidden, text content, URL match, element count, attribute value, and console message. All assertions use polling with configurable timeouts and capture an AX snapshot on failure for debugging.

#### Temporal Assertions

Three modes for time-dependent verification: always (condition holds for a duration), eventually (condition becomes true within a deadline), and next (condition holds on the very next check). No brittle waits.

#### Health Monitors

Passive console error, JavaScript exception, and HTTP error checking runs after every test step. Zero configuration. If your app throws a console error during a test, you'll know.

#### Coverage Reports

Three coverage dimensions in one weighted report: PiperProbe element coverage (60%), CDP JavaScript coverage (30%), and CSS coverage (10%). Color-coded bar with expandable uncovered elements per page.

#### Playwright / Cypress Export

One-click deterministic export. AX selectors map to each framework's native format: role:button:Sign In becomes page.getByRole('button', { name: 'Sign In' }) in Playwright. Clean, idiomatic code ready for CI.

## 20 MCP Tools for AI Agents

Any MCP-capable AI client — Claude Code, Cursor, Windsurf — can create, run, heal, and export tests.

#### browser_snapshot

Returns Chrome's real AX tree as structured plain text. Auto-connects to Chrome on first call. The AI reads the page the same way a screen reader does — semantic roles, names, and states, not raw HTML.

#### browser_action

Click, fill, select, hover, scroll, and type using AX selectors. Self-healing resolves broken selectors automatically. Returns a structured AX diff showing exactly what changed on the page after the action.

#### test_run

Execute a saved PiperTest session with optional self-healing, health monitoring, temporal assertions, and coverage collection. Returns pass/fail summary with detailed results per step.

#### test_export

Export any PiperTest session to idiomatic Playwright or Cypress code. The AI can generate tests from a browser snapshot, save them, run them, heal failures, and export the final result — all through MCP tools.

## FAQ

### Does PiperTest replace Playwright?

For test authoring and iteration, yes. PiperTest's visual recorder, self-healing, and inline editor handle the create-and-debug loop without code. For CI execution, no — PiperTest exports to Playwright (or Cypress) code that runs in your existing pipeline. Think of PiperTest as the authoring tool and Playwright as the CI runtime.

### Is PiperTest free?

The full testing capability ships in ToolPiper's free tier. 14 browser MCP tools, 6 test tools, visual recording, self-healing, assertions, health monitoring, temporal assertions, coverage, and Playwright/Cypress export are all free. ToolPiper Pro ($9.99/month) adds additional features across other ToolPiper capabilities but is not required for testing.

### How does self-healing work without AI?

The default healing mode uses local AX fuzzy matching with zero external calls. When a selector fails, PiperTest takes a fresh AX tree snapshot and searches for nodes matching the original selector's role and approximate name. Candidates are scored by role match, name edit distance, and tree position. High-confidence matches execute automatically in 5-15ms.

### Can AI write tests for me?

Yes, through MCP tools. Any MCP-capable AI client takes a browser snapshot (which returns the AX tree as plain text), reasons about what should be tested, generates PiperTest steps, saves them, runs them, and reports results. This works with Claude Code, Cursor, Windsurf, or any MCP client.

### Why AX selectors instead of data-testid?

data-testid attributes are stable anchors, but they require developers to add them to every testable element, which means test infrastructure leaks into production code. AX selectors use what's already there: the element's role and accessible name. If your app is accessible, it's testable. If an AX selector doesn't resolve, it often means the element isn't accessible — which is a bug worth knowing about.
