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), or pasting the console summary into a channel.

Publish the folder

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:

  • 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.
  • Scripts run in a sandboxed iframe (allow-scripts, no allow-same-origin), so the collapsible groups still work.

From CI

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.

What review adds

  • Anchored threads on the failing method — commenting 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.

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 →

Related