TestivAI

v0.9.5
ai.testiv/mcp Checked 15 hours ago Published 10 days ago

Local-first visual regression for AI agents: verdicts, diff images, explain_snapshot.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_visual_results Get visual test results

Read the latest TestivAI visual regression results (visual-report/results.json). Returns a per-snapshot verdict combining the pixel diff with the DOM and computed-style signals. A pixel diff is likely render noise when the DOM and the computed styles both match and the diff is small and scattered; a diff whose DOM and computed styles match but that is concentrated in one area or over 1% of pixels gets its own verdict, not noise: it is a bad capture or a change the style check does not cover (size, overflow, transform, images…), so look at the diff (get_diff) before approving; when the enviro…

get_diff View snapshot diff images

Return the baseline, current, and diff images for one changed snapshot so you can see what changed visually: the full page downscaled to fit (it shows where the changes are), then, when it had to be downscaled, each changed region cropped at native scale with 32 px around it and as wide as the page (up to 1280 px), so you can read text, wrapping and clipping there (up to 3 crops, each at most 1280×1024 px and 2,000,000 px in all; nearby regions share a crop, changes come before shifts, a wider area is sampled at 1/2 scale or smaller, and a taller one shows its top rows). Pass `region` (an ind…

ParameterTypeDescription
name *stringSnapshot name from the results
heightintegerRows of the band from y (default: what one crop shows, 1024 at native scale); a taller band shows its top rows and says where to continue
regionintegerIndex of one of the snapshot's regions, as get_diff lists them (results.json order): returns only that region, cropped at native scale
yintegerTop of a full-width band of the page, in pixels: returns only that band, at native scale

get_snapshot_diff View snapshot diff images

Return the baseline, current, and diff images for one changed snapshot so you can see what changed visually: the full page downscaled to fit (it shows where the changes are), then, when it had to be downscaled, each changed region cropped at native scale with 32 px around it and as wide as the page (up to 1280 px), so you can read text, wrapping and clipping there (up to 3 crops, each at most 1280×1024 px and 2,000,000 px in all; nearby regions share a crop, changes come before shifts, a wider area is sampled at 1/2 scale or smaller, and a taller one shows its top rows). Pass `region` (an ind…

ParameterTypeDescription
name *stringSnapshot name from the results
heightintegerRows of the band from y (default: what one crop shows, 1024 at native scale); a taller band shows its top rows and says where to continue
regionintegerIndex of one of the snapshot's regions, as get_diff lists them (results.json order): returns only that region, cropped at native scale
yintegerTop of a full-width band of the page, in pixels: returns only that band, at native scale

get_report Get the raw visual report (results.json)

Return the machine-readable results.json payload verbatim (summary + per-snapshot status, diff %, DOM signal, and region→selector attribution, plus missingBaselines: committed baselines with no capture this run). Parse this instead of scraping CLI output.

approve_snapshot Approve one snapshot as the new baseline

Promote .testivai/temp/<name>/ to the committed baseline (same as `testivai approve <name>`). Only approve changes a reviewer has confirmed are intended; then commit .testivai/baselines/.

ParameterTypeDescription
name *stringSnapshot name to approve

approve_all Approve all pending snapshots as baselines

Promote every pending capture under .testivai/temp/ to committed baselines (same as `testivai approve --all`). Only run this after a reviewer has confirmed the changes; then commit .testivai/baselines/.

list_baselines List committed baselines

List the snapshot baselines committed under .testivai/baselines/.

explain_snapshot Explain what changed in one snapshot

Layered evidence for one snapshot: pixel regions with bounding boxes, element attribution (which selectors shifted vs changed, whole-page shift detection), the DOM/style signal, and interpretation guidance. Use this to explain WHY a diff happened — pair with get_diff for the images. For a missing baseline (no capture this run) it returns status "missing", the committed baseline files and what to check instead.

ParameterTypeDescription
name *stringSnapshot name from the results