Share a BackstopJS report

Visual regression testing has a well-known failure mode, and it is not technical. The suite runs, produces forty diffs, and then waits for a human to say which ones are intended. That human is usually a designer, and the report is usually on a CI worker behind a login they do not have.

So the diffs get screenshotted into Slack, one at a time, and the approval conversation happens next to a cropped image with an arrow drawn on it.

Publish it

npx backstop test || true

curl -fsS -X PATCH \
  "https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html backstop_data/html_report/index.html \
        --arg title "Visual diffs — $BRANCH — build $BUILD_NUMBER" \
        '{title: $title, html: $html}')"

The report is image-heavy by nature, so dragging backstop_data/html_report/ into the app is usually the better route: the reference, test and diff images upload as assets and their references are rewritten to the uploaded copies. Publish the index alone and you get a report shaped like a visual diff with no visuals in it.

|| true because backstop test exits non-zero whenever anything differs, which is every run you care about.

What the URL changes

  • Approval happens on the diff. "Intended — new spacing scale" or "regression, DES-77" pinned to the scenario. See commenting on HTML.
  • The designer needs no tooling. A link, in a browser, on a phone.
  • Run-over-run history. Same URL, revision per run, so the conversation about last week's diff is still there.
  • Private by default — pre-release UI is not something to leave on a guessable URL. See the sharing model.

Limits

  • Entry HTML: 5 MB. Assets: 25 MB per file, 250 MB and 500 files total — three images per scenario per viewport adds up quickly. Publish per section when the matrix is large.
  • Scripts run, sandboxed: allow-scripts, no allow-same-origin.
  • 60 requests/minute per token.

Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision history.

Create your first report →

Related