Local-first visual regression for AI agents: verdicts, diff images, explain_snapshot. No API key.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Local-first visual regression testing SDKs for modern web applications.
This is the home of TestivAI. It contains everything you need to capture, diff, and report visual regressions fully locally β MIT-licensed, no account, no server.
See a live report β β a real TestivAI OSS report rendered in your browser, straight from CI. No install, no signup.
Pixel-only visual testing drowns you in false positives β a font re-hint or an anti-aliasing shift across machines lights up as a "change," and you spend your time re-approving noise.
TestivAI pairs every screenshot with a snapshot of the page DOM. When pixels differ but the DOM is structurally identical, the report flags the diff as likely render noise instead of crying wolf. When the DOM actually changed, you see exactly what (2 added, 1 removed). That single signal is the difference between a flaky test wall and a report you trust.
button.cta", never as noise.div.card:nth-of-type(2) shifted +8px vertically β content unchanged") and spots the injected-banner case ("everything below y=80 moved +24px"), derived from layout, not pixel guesswork. No local-first tool does this./testivai approve comment.results.json is a semver-governed public contract.Evaluating this for a team? Maintenance & roadmap covers who builds it, the release cadence, and what happens to your setup if maintenance ever stops.
Already using Playwright's
toHaveScreenshot()? It's good, and if a pixel diff answers your question you should keep using it. Here's an honest look at what TestivAI adds and when it isn't worth the dependency.
If an AI agent (Claude Code, Cursor, Copilot, β¦) writes your UI code, someone still has to check what the UI looks like β and it shouldn't be you, one screenshot at a time. TestivAI is built to be that check:
visual-report/results.json (a semver-governed schema) with per-snapshot diff percentages and DOM change summaries, so an agent can read the result and self-correct.2 added, 1 removed), so it doesn't chase anti-aliasing ghosts.explain_snapshot tool hands your agent layered evidence (which selectors shifted vs changed, whole-page shift detection, style-only changes) and your model writes the narrative: "card #2 shifted +24px β likely the banner injected above it." No hosted AI service in the loop./testivai approve comment.Paste this into your project's AGENTS.md / CLAUDE.md to wire it up (full guide with MCP setup, a real agent transcript, and the approval rule: docs/guides/ai-agents.md):
Live versions are shown by the badges at the top of this README.
| Package | Description |
|---|---|
@testivai/witness | Core SDK: CLI, local diffing, baselines, HTML report generator |
@testivai/witness-playwright | Playwright reporter/adapter built on top of @testivai/witness |
@testivai/witness-webdriverio | WebdriverIO service + capture function (local mode) |
@testivai/witness-selenium | Selenium WebDriver capture adapter (Python/Java Selenium live in python/ and java/) |
@testivai/mcp | MCP server β visual results + diff images for AI coding agents |
testivai (PyPI) | Python adapter for playwright-python + pytest plugin β same baselines & report |
ai.testiv:testivai | Java adapter for playwright-java + JUnit 5 extension (experimental) |
testivai (RubyGems) | Ruby adapter for Capybara / RSpec / Cucumber β same baselines & report |
Plus:
action/ β GitHub Action for PR-based visual approvalsexamples/ β minimal real-world example projectsdocs/ β public documentatione2e/ β OSS smoke E2E test suiteAI-built and vibe-coded apps (Lovable, Bolt, v0, ...) usually ship with zero tests. You still get the full safety net:
TestivAI launches a headless Chrome, discovers your pages (or takes
--pages "/,/pricing"), and captures each one β baselines, diffs, noise
hints, HTML report, and PR approvals all work exactly as below, no test
framework required. See the vibe-coded apps guide.
First run: baselines are written to .testivai/baselines/.
Later runs: screenshots are diffed and a self-contained HTML report is written to ./visual-report/.
maxDiffPercent / maxDiffPixels tolerances, plus opt-in noiseAutoPass so DOM-identical render noise stops demanding reviewignoreSelectors for dynamic content (both adapters, global or per-snapshot)visual-report/index.html)visual-report/results.json).testivai/baselines/ (just git add them)Copy this single workflow file into your repository. It handles both running the visual regression tests and processing /testivai approve commands from PR comments β no extra secrets, no external services required.
After CI posts the diff report on your PR, review the testivai-visual-report artifact, then comment:
| Comment | Effect |
|---|---|
/testivai approve homepage | Approves one named snapshot |
/testivai approve --all | Approves every changed snapshot at once |
What happens:
testivai-visual-report artifact from the latest CI run on your branch.testivai/baselines/ and commits them to your PR branchA complete, minimal consumer project lives at testivai-example: a static page, three witness() calls, the PR /testivai approve flow, and a live report on Pages β all against the published packages.
Bug reports, feature requests, and PRs welcome. Please see:
Releases are published to npm under the latest dist-tag. See CUTOVER.md for the release runbook and .github/workflows/release.yml for the release workflow.
This repository was extracted from the private TestivAI monorepo with a clean initial git history. Original development history is preserved internally; this public repository is the new source of truth for the SDKs going forward.
MIT β see LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-33)<a href="https://allmcps.com/mcp/mcp-33"><img src="https://allmcps.com/api/badge/mcp-33?style=directory" alt="Mcp on AllMCPs" /></a>