# Share a cargo-nextest Report — Rust Test Runs as a URL

Canonical: https://commareports.com/share-cargo-nextest-report
Published: 2026-09-15

> cargo-nextest writes JUnit from a profile, not a flag. Configure it, convert the XML, and publish to Comma so a Rust suite becomes a link with a revision per run.

# Share a cargo-nextest report

nextest is the reason Rust suites got fast, and it kept the thing `cargo test`
never had: a machine-readable result. The catch is that JUnit output is
configured in a file rather than passed as a flag, so most people assume it
isn't there.

## Turn on JUnit in a profile

```toml
# .config/nextest.toml
[profile.ci.junit]
path = "junit.xml"
```

```bash
cargo install cargo-nextest junitify 2>/dev/null || true
pip install junit2html

cargo nextest run --profile ci || true
junit2html target/nextest/ci/junit.xml nextest.html
```

The file lands under `target/nextest/<profile>/`, which is the part people
miss when the path looks empty.

## Publish it

Drag `nextest.html` into [the app](https://commareports.com/), or from CI:

```bash
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 nextest.html \
        --arg title "nextest — $GITHUB_REF_NAME" '{title: $title, html: $html}')"
```

One id per crate or workspace, PATCHed on every run. `if: always()` on the
publish step so a red run still produces the link.

## Retries are the interesting column

nextest's `--retries` turns an intermittent failure into a pass, which is
convenient and dangerous in equal measure. The JUnit output records the
retry, so the converted page shows the tests that only passed on the second
attempt — and because the URL keeps a revision per run, a test that is
quietly retrying its way to green every week is visible instead of invisible.

- **Anchored threads** on that test — "this depends on wall-clock time, here's
  the fix" — kept next to it. See [commenting on HTML](/comment-on-html).
- **A [routine](/features/routines/scheduled-html-reports)** if you want a
  nightly run publishing itself.

## 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 a Rust coverage report](/share-rust-coverage-report) · [Share a Clippy report](/share-clippy-report)
- [Share rustdoc](/share-rustdoc) · [Share a Criterion benchmark report](/share-criterion-benchmark-report)
- [Share a JUnit report](/share-junit-report) · [Publish from CI](/docs/ci)
