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
# .config/nextest.toml
[profile.ci.junit]
path = "junit.xml"
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, or from CI:
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.
- A routine 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.