[{"data":1,"prerenderedAt":421},["ShallowReactive",2],{"navigation_docs":3,"-learn-faq":121,"-learn-faq-surround":416},[4,41,51,56,104,116],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":40},"Learn","i-lucide-book-open","\u002Flearn","1.learn",[10,15,20,25,30,35],{"title":11,"path":12,"stem":13,"icon":14},"What visual regression testing is","\u002Flearn\u002Fwhat-is-visual-regression-testing","1.learn\u002F1.what-is-visual-regression-testing","i-lucide-eye",{"title":16,"path":17,"stem":18,"icon":19},"How image diffing works","\u002Flearn\u002Fhow-image-diffing-works","1.learn\u002F2.how-image-diffing-works","i-lucide-diff",{"title":21,"path":22,"stem":23,"icon":24},"Why screenshots flake","\u002Flearn\u002Fwhy-screenshots-flake","1.learn\u002F3.why-screenshots-flake","i-lucide-shuffle",{"title":26,"path":27,"stem":28,"icon":29},"Baselines and approval","\u002Flearn\u002Fbaselines-and-approval","1.learn\u002F4.baselines-and-approval","i-lucide-check-check",{"title":31,"path":32,"stem":33,"icon":34},"Running in CI","\u002Flearn\u002Frunning-in-ci","1.learn\u002F5.running-in-ci","i-lucide-workflow",{"title":36,"path":37,"stem":38,"icon":39},"FAQ","\u002Flearn\u002Ffaq","1.learn\u002F7.faq","i-lucide-circle-help",false,{"title":42,"icon":43,"path":44,"stem":45,"children":46,"page":40},"Deep dives","i-lucide-telescope","\u002Fdeep-dives","3.deep-dives",[47],{"title":48,"path":49,"stem":50,"icon":43},"Types of visual diffing","\u002Fdeep-dives\u002Fdiff-engines","3.deep-dives\u002F1.diff-engines",{"title":52,"path":53,"stem":54,"icon":55},"Compare the tools","\u002Fcompare","4.compare","i-lucide-scale",{"title":57,"path":58,"stem":59,"children":60,"icon":63},"Manifest","\u002Fmanifest","5.manifest\u002F1.index",[61,64,69,74,79,84,89,94,99],{"title":62,"path":58,"stem":59,"icon":63},"The run manifest","i-lucide-file-json",{"title":65,"path":66,"stem":67,"icon":68},"Write your own converter","\u002Fmanifest\u002Fwrite-a-converter","5.manifest\u002F10.write-a-converter","i-lucide-wrench",{"title":70,"path":71,"stem":72,"icon":73},"The format","\u002Fmanifest\u002Fformat","5.manifest\u002F2.format","i-lucide-file-code",{"title":75,"path":76,"stem":77,"icon":78},"Reading manifests","\u002Fmanifest\u002Freading","5.manifest\u002F3.reading","i-lucide-book-open-check",{"title":80,"path":81,"stem":82,"icon":83},"Merging the manifests of a run","\u002Fmanifest\u002Fmerging","5.manifest\u002F4.merging","i-lucide-merge",{"title":85,"path":86,"stem":87,"icon":88},"Writing manifests","\u002Fmanifest\u002Fwriting","5.manifest\u002F5.writing","i-lucide-pencil-line",{"title":90,"path":91,"stem":92,"icon":93},"Converting to and from other formats","\u002Fmanifest\u002Fconverting","5.manifest\u002F6.converting","i-lucide-arrow-left-right",{"title":95,"path":96,"stem":97,"icon":98},"Reference","\u002Fmanifest\u002Freference","5.manifest\u002F7.reference","i-lucide-list",{"title":100,"path":101,"stem":102,"icon":103},"Schema reference","\u002Fmanifest\u002Fschema","5.manifest\u002F8.schema","i-lucide-braces",{"title":105,"path":106,"stem":107,"children":108,"icon":14},"Viewer","\u002Fviewer","6.viewer\u002F1.index",[109,111],{"title":110,"path":106,"stem":107,"icon":14},"In-browser Viewer",{"title":112,"path":113,"stem":114,"icon":115},"Command line","\u002Fviewer\u002Fcli","6.viewer\u002F2.cli","i-lucide-terminal",{"title":117,"path":118,"stem":119,"icon":120},"Which diff algorithm is best for you?","\u002Fdiff-algorithms","8.diff-algorithms","i-lucide-git-compare",{"id":122,"title":36,"body":123,"description":409,"extension":410,"links":411,"meta":412,"navigation":413,"path":37,"seo":414,"stem":38,"__hash__":415},"docs\u002F1.learn\u002F7.faq.md",{"type":124,"value":125,"toc":386},"minimark",[126,131,136,148,152,160,164,169,173,178,182,190,194,198,204,208,220,251,255,275,279,282,297,313,317,328,332,342,346,361,365,369,382],[127,128,130],"h2",{"id":129},"testing","Testing",[132,133,135],"h3",{"id":134},"do-i-need-a-hosted-service","Do I need a hosted service?",[137,138,139,140,143,144,147],"p",{},"No. Playwright, Vitest, jest-image-snapshot, BackstopJS, Roborazzi and pixsame keep baselines in your repository and compare them on your own machines. A hosted service buys you a review interface, history and baselines that are off the repository, at a price per screenshot. ",[141,142,26],"a",{"href":27}," has the trade-off and ",[141,145,146],{"href":53},"the comparison"," lists which tool does what.",[132,149,151],{"id":150},"should-baselines-be-committed-to-git","Should baselines be committed to git?",[137,153,154,155,159],{},"If the tool stores them next to the tests, yes: a branch then carries its own baselines, a revert reverts them and the pull request shows which images changed. The cost is repository size, which Git LFS addresses, and that every contributor has to render identical pixels. See ",[141,156,158],{"href":157},"\u002Flearn\u002Fbaselines-and-approval#where-baselines-live","Where baselines live",".",[132,161,163],{"id":162},"why-do-my-tests-pass-locally-and-fail-in-ci","Why do my tests pass locally and fail in CI?",[137,165,166,167,159],{},"Almost always because the renderer differs: another operating system, browser build, font stack or device pixel ratio. Pin the renderer first (a container image, or a cloud browser), then work through the rest in ",[141,168,21],{"href":22},[132,170,172],{"id":171},"what-threshold-should-i-use","What threshold should I use?",[137,174,175,176,159],{},"The smallest one that makes a stable test pass, set on the screenshot that needs it and not globally, and only after the renderer is pinned and the noise is masked. A threshold that is raised early hides real changes. See ",[141,177,21],{"href":22},[132,179,181],{"id":180},"which-tool-should-i-pick","Which tool should I pick?",[137,183,184,185,189],{},"It depends on where you already test (Playwright, Cypress, Vitest, Storybook, a mobile project), on whether you want baselines in git or a service, and on what you are willing to pay for. ",[141,186,188],{"href":187},"\u002Fcompare#choosing-a-tool","Choosing a tool"," on the comparison page walks through it and puts the tools side by side.",[127,191,193],{"id":192},"the-manifest-and-the-viewer","The manifest and the viewer",[132,195,197],{"id":196},"what-is-the-run-manifest","What is the run manifest?",[137,199,200,201,203],{},"One JSON file per test run that lists every screenshot comparison: its status, diff ratio, limits, the paths of the baseline, actual and diff images, and where the run happened. A review page or a pull request bot then reads one file instead of walking the snapshot folders. ",[141,202,70],{"href":71}," describes it.",[132,205,207],{"id":206},"does-my-tool-have-to-write-a-manifest","Does my tool have to write a manifest?",[137,209,210,211,214,215,219],{},"No. For the tools that write none, ",[141,212,213],{"href":91},"the converters"," build one from what the tool leaves on disk. The ",[216,217,218],"code",{},"visual-regression-manifest convert \u003Ctool>"," command runs them without a script:",[221,222,227],"pre",{"className":223,"code":224,"language":225,"meta":226,"style":226},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npx visual-regression-manifest convert playwright report.json\n","bash","",[216,228,229],{"__ignoreMap":226},[230,231,234,238,242,245,248],"span",{"class":232,"line":233},"line",1,[230,235,237],{"class":236},"sBMFI","npx",[230,239,241],{"class":240},"sfazB"," visual-regression-manifest",[230,243,244],{"class":240}," convert",[230,246,247],{"class":240}," playwright",[230,249,250],{"class":240}," report.json\n",[132,252,254],{"id":253},"which-tools-can-be-converted","Which tools can be converted?",[137,256,257,258,261,262,265,266,272,273,159],{},"Playwright's ",[216,259,260],{},"toHaveScreenshot",", Vitest's ",[216,263,264],{},"toMatchScreenshot",", jest-image-snapshot, cypress-image-snapshot, cypress-visual-regression, cypress-image-diff-js, BackstopJS, Roborazzi, reg-cli and reg-suit, Lost Pixel and Loki, plus CTRF reports. The ",[141,267,271],{"href":268,"rel":269},"https:\u002F\u002Fpixsame.com",[270],"nofollow","pixsame"," Cypress plugin writes the manifest itself. For anything else, see ",[141,274,65],{"href":66},[132,276,278],{"id":277},"how-do-i-review-a-ci-run","How do I review a CI run?",[137,280,281],{},"Convert the run into a manifest if the tool does not write one, upload the folder as an artifact, and open it with the viewer:",[221,283,285],{"className":223,"code":284,"language":225,"meta":226,"style":226},"npx visual-regression-viewer artifact.zip\n",[216,286,287],{"__ignoreMap":226},[230,288,289,291,294],{"class":232,"line":233},[230,290,237],{"class":236},[230,292,293],{"class":240}," visual-regression-viewer",[230,295,296],{"class":240}," artifact.zip\n",[137,298,299,300,303,304,307,308,312],{},"The viewer accepts a folder, a manifest file or a zip. To publish a report instead, write it with ",[216,301,302],{},"-o"," and ",[216,305,306],{},"--no-serve",". ",[141,309,311],{"href":310},"\u002Fviewer\u002Fcli#using-it-in-ci","The viewer's CI section"," has a GitHub Actions job that also fails on differences and writes the summary.",[132,314,316],{"id":315},"does-the-viewer-send-my-screenshots-anywhere","Does the viewer send my screenshots anywhere?",[137,318,319,320,323,324,159],{},"No. The command makes no network requests and sends no telemetry. The page it builds is one self-contained HTML file. The ",[141,321,322],{"href":106},"browser-only viewer"," reads the files you drop onto it in your browser and uploads nothing; see ",[141,325,327],{"href":326},"\u002Fprivacy","privacy",[132,329,331],{"id":330},"which-node-version-do-i-need","Which Node version do I need?",[137,333,334,335,338,339,159],{},"Node 20.9 or newer for ",[216,336,337],{},"visual-regression-manifest",", and Node 22.12 or newer for ",[216,340,341],{},"visual-regression-viewer",[132,343,345],{"id":344},"is-the-manifest-an-official-standard","Is the manifest an official standard?",[137,347,348,349,354,355,360],{},"Not yet. It is an open format with one maintainer, a JSON Schema and a reference library, built on ",[141,350,353],{"href":351,"rel":352},"https:\u002F\u002Fctrf.io",[270],"CTRF"," so it converts to a CTRF report and back. The aim is a format any tool can write and any review tool can read, and ",[141,356,359],{"href":357,"rel":358},"https:\u002F\u002Fgithub.com\u002Fvisual-regression\u002Fvisual-regression",[270],"the repository"," welcomes changes to it.",[127,362,364],{"id":363},"about-this-site","About this site",[132,366,368],{"id":367},"who-maintains-this","Who maintains this?",[137,370,371,372,375,376,381],{},"The ",[141,373,271],{"href":268,"rel":374},[270]," team maintains it and the code is MIT licensed. The site should stay useful to every visual regression tool. Corrections, comparison entries and and converters for other tools are welcome through a pull request or an issue, as ",[141,377,380],{"href":378,"rel":379},"https:\u002F\u002Fgithub.com\u002Fvisual-regression\u002Fvisual-regression\u002Fblob\u002Fmain\u002FCONTRIBUTING.md",[270],"CONTRIBUTING"," describes.",[383,384,385],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":226,"searchDepth":387,"depth":387,"links":388},2,[389,397,406],{"id":129,"depth":387,"text":130,"children":390},[391,393,394,395,396],{"id":134,"depth":392,"text":135},3,{"id":150,"depth":392,"text":151},{"id":162,"depth":392,"text":163},{"id":171,"depth":392,"text":172},{"id":180,"depth":392,"text":181},{"id":192,"depth":387,"text":193,"children":398},[399,400,401,402,403,404,405],{"id":196,"depth":392,"text":197},{"id":206,"depth":392,"text":207},{"id":253,"depth":392,"text":254},{"id":277,"depth":392,"text":278},{"id":315,"depth":392,"text":316},{"id":330,"depth":392,"text":331},{"id":344,"depth":392,"text":345},{"id":363,"depth":387,"text":364,"children":407},[408],{"id":367,"depth":392,"text":368},"Short answers to the questions that come up first about visual regression testing, baselines, flaky screenshots, and the run manifest and viewer.","md",null,{},{"icon":39},{"title":36,"description":409},"VnzHOJQMcHuQjFa-G9f4VQvH1oyYGflQ28QyBXx9Wgs",[417,419],{"title":31,"path":32,"stem":33,"description":418,"icon":34,"children":-1},"Artifacts, sharding, merging results from several machines, reporting on the pull request and keeping the bill down.",{"title":48,"path":49,"stem":50,"description":420,"icon":43,"children":-1},"Exact, tolerance-based, shift-tolerant, structural, hash-based and layout-aware comparison, what each type measures, what it ignores and what its numbers mean, with pixelmatch, odiff, Resemble.js, looks-same, SSIM and the hosted services as examples.",1795388678439]