Manifest

The run manifest

The standard we propose. One JSON file per test run that lists every screenshot comparison. Built upon CTRF, compatible with several tools and read by PR bots and review apps.

Every visual regression tool ends a run the same way: some comparisons passed, some failed, some had no baseline yet and the images are saved somewhere on disk. That information is needed no matter what happens next: a comment on the pull request, a review screen, a button that approves a baseline. Today almost every tool leaves image folders and nothing else and every review tool parses logs or walks directories to work out what happened. And when something is missing or breaks - you can either change the tool or write one by yourself.

The visual regression manifest is that missing piece: visual-regression-manifest.json. One file that's listing every comparison with its status, diff ratio, the limits it was checked against, the paths of the images, metadata (CI provider, repository, commit, pull request) and what ran it.

written by the plugin during the run

$ npx cypress run
✓ 42 screenshots compared, 2 failed
✎ visual-regression-manifest.json written
{
  "reportFormat": "visual-regression-manifest",
  "specVersion": "1.0.0-beta.1",
  "tool": { "name": "@pixsame/cypress-plugin-visual-regression-diff", "version": "4.3.0" },
  "runner": { "name": "cypress", "version": "16.1.0" },
  "summary": { "entries": 42, "passed": 40, "failed": 2, "needsHuman": 2 },
  "entries": [
    {
      "name": "checkout-summary",
      "status": "failed",
      "comparison": { "diffRatio": 0.0231, "maxDiffRatio": 0.01, "colorThreshold": 0.1, "colorMetric": "yiq" },
      "images": {
        "baseline": { "path": "cypress/e2e/__image_snapshots__/checkout summary_#0.png" },
        "actual":   { "path": "cypress/e2e/__image_snapshots__/checkout summary_#0.actual.png" },
        "diff":     { "path": "cypress/e2e/__image_snapshots__/checkout summary_#0.diff.png" }
      }
    }
  ]
}

Tool, runner or the paths change, but every manifest has the same: keys, statuses and three images per entry. Thanks to that structure a PR bot, a review app or the viewer can read any of them.

The format

An annotated example, the status table and the rules every writer and reader follows.

Schema reference

Every field, generated from the JSON Schema at /schema/v1.json.

Converting

Make a manifest from Playwright, Vitest, jest-image-snapshot, cypress-visual-regression, BackstopJS, Roborazzi or plain image files; export to CTRF.

Viewer

Drop a manifest and its images into the browser and review them. Nothing is uploaded. Also available as an npm cli package.

Built upon CTRF

CTRF, the Common Test Report Format, is the one cross-tool test results format with a growing ecosystem of reporters and CI integrations. It has no notion of a screenshot comparison: no baseline, actual and diff triple, no diff ratio, no "needs a baseline" outcome. Rather than invent a parallel vocabulary, the manifest uses CTRF's names wherever CTRF has a field (reportFormat, specVersion, tool, summary, commit, buildId, osPlatform, extra, attachments) and adds only what a visual comparison needs.

The result is a file that converts to a CTRF report and back without renaming anything: toCtrf writes one CTRF test of type: "visual" per comparison with the images as attachments, so every CTRF-aware PR summary or dashboard shows your visual results today, and fromCtrf reads it back. A proposal to document the visual fields upstream is open with the CTRF maintainers.

Implementations

The manifest is meant to be a standard. But as of now it is an open format with one maintainer, a schema, a reference library and converters. This table is the current state of adoption.

Writes it nativelyConverted by visual-regression-manifestReads it
pixsame Cypress pluginPlaywright toHaveScreenshot, Vitest toMatchScreenshot, jest-image-snapshot, cypress-image-snapshot, cypress-visual-regression, BackstopJS, Roborazzi, any tool that leaves baseline/actual/diff imagesthe viewer, the pixsame GitHub App (in preparation), anything that reads CTRF via toCtrf

Adding your tool to the middle column is one file and one test in the repository: write your own converter shows how. Adding it to the first is ManifestWriter and a few lines in your plugin.

Install

npm install visual-regression-manifest

The package has no runtime dependencies and ships the JSON Schema, TypeScript types, a reader with validation, a writer that keeps the file complete even when the run is killed, a merger for runs split across machines and the per-integration converters.

To convert a tool's output without writing code, run npx visual-regression-manifest convert <tool> in the project the tool ran in: see the command line.