# Share a TestNG Report — test-output/ on a Real URL

Canonical: https://commareports.com/share-testng-report
Published: 2026-08-25

> TestNG writes index.html and emailable-report.html into test-output/, then the workspace is wiped. Publish the folder to Comma for a stable link, a revision per run, and comments on the failures.

# Share a TestNG report

TestNG's default listeners write `test-output/` — `index.html`, the
suite pages, `emailable-report.html`, and the CSS and JS that make the
first one readable. It's a decent report and it lives for exactly as
long as the workspace does.

The two usual escapes are worse than the problem: emailing
`emailable-report.html` (see
[why that goes wrong](/email-html-report)), or pasting the console
summary into a channel.

## Publish the folder

```bash
mvn -B test        # or: gradle test
# → test-output/index.html, test-output/emailable-report.html, …
```

Drag `test-output/` (or a zip of it) into
[the app](https://commareports.com/):

- `index.html` becomes the **report body**.
- The stylesheets, scripts and suite pages upload alongside and their
  relative references are rewritten — which is why the copied-out file
  renders unstyled and the published one doesn't. Background in
  [why the report lost its CSS](/html-report-broken-css).
- Scripts run in a sandboxed iframe (`allow-scripts`, no
  `allow-same-origin`), so the collapsible groups still work.

## From CI

```bash
mvn -B test || true

curl -fsS -X PATCH "https://commareports.com/api/v1/reports/$REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html test-output/index.html \
        --arg title "Suite — $GIT_COMMIT" '{title: $title, html: $html}')"
```

Use `if: always()` / `when: always` / `post { always { … } }` so a red
build publishes too. PATCHing one id gives a stable URL per suite and a
revision per run — see [publishing from CI](/docs/ci).

## What review adds

- **Anchored threads** on the failing method — [commenting on
  HTML](/comment-on-html).
- **Revisions** for run-to-run comparison, instead of "I think it was
  green on Tuesday."
- **Access per report** — private, team, domain-gated or named
  reviewers. See the [sharing model](/docs/sharing).

## Limits

- **Entry HTML: 5 MB.** Assets: 25 MB per file, 250 MB and 500 files
  total.
- **60 requests/minute per token.**

## Try it

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

**[Publish a test report →](https://commareports.com/)**

### Related

- [Share an Extent Report](/share-extent-report) · [Share an Allure report](/share-allure-report)
- [Turn JUnit XML into HTML](/share-junit-report) · [Share a JaCoCo report](/share-jacoco-report)
- [Publish from CI](/docs/ci)
