# Share a Nightwatch HTML Report — Failures on a Link, Screenshots Intact

Canonical: https://commareports.com/share-nightwatch-report
Published: 2026-09-01

> Nightwatch's built-in HTML reporter writes a browsable report with screenshots. Publish it to Comma from CI for one URL per suite, threads on individual failures, and a revision per run.

# Share a Nightwatch report

The useful part of a Nightwatch failure is rarely the assertion message.
It is the screenshot taken at the moment it failed, and the sequence of
steps that led there. Both of which are in the HTML report, and neither
of which fits in the Slack message someone actually sends: "e2e is red
again."

## Publish it

```bash
npx nightwatch --reporter html || true
```

Nightwatch writes `tests_output/nightwatch-html-report/index.html` plus
the screenshots it references. Publish the directory:

```bash
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 tests_output/nightwatch-html-report/index.html \
        --arg title "E2E — $BRANCH — build $BUILD_NUMBER" \
        '{title: $title, html: $html}')"
```

Or drag the whole `nightwatch-html-report/` folder into
[the app](https://commareports.com/), which uploads the screenshots as
assets and rewrites the references to the uploaded copies. That second
part is the step people skip, and it is why a report that looked fine
locally shows [empty image slots](/html-report-broken-css) once it is
somewhere else.

`|| true` because the failing run is the one worth publishing. `PATCH` on
a per-suite report id keeps one URL with a revision per run.

## What the URL changes

- **Comments on the failure, not about it.** "This is the cookie banner
  again, not a regression" pinned to the step. See
  [commenting on HTML](/comment-on-html).
- **Run-over-run history.** Which build a flake started in, at a URL
  that does not expire with the artifact retention window.
- **No CI access needed.** A designer or a PM opens a link.
- **Nightly runs.** A [routine](/docs/routines) refreshes the report on a
  schedule, so the suite has a current state without a push.

## Limits

- **Entry HTML: 5 MB.** Assets: 25 MB per file, **250 MB and 500 files
  total** — a suite that screenshots every step can pass 500 files.
  Screenshot on failure only for the published report.
- **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 →](https://commareports.com/)**

### Related

- [WebdriverIO reports](/share-webdriverio-report) · [Playwright reports](/share-playwright-report)
- [Cypress reports](/share-cypress-report) · [Mochawesome](/share-mochawesome-report)
- [GitHub Actions](/ci/github-actions-html-report) · [Publish from CI](/docs/ci)
