Share an Xcode test report
xcodebuild test produces an .xcresult bundle: genuinely rich, with
per-test timing, attachments, and video of UI test failures. It is also a
macOS bundle that only Xcode can read.
So iOS test results reach everyone else the way they always have — as a
screenshot of the Report Navigator, cropped to the red row.
Convert the bundle to HTML
xcodebuild test \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15' \
-resultBundlePath TestResults.xcresult || true
# community converter: reads the bundle, writes a self-contained report
xchtmlreport -r TestResults.xcresult
# → TestResults.xcresult/index.html
Apple's own xcresulttool exports the bundle's JSON if you'd rather
template it yourself:
xcrun xcresulttool get --path TestResults.xcresult --format json
Note the || true — a failing test fails xcodebuild, and everything
after it has to survive that. That's the run you most want published.
Publish it
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 index.html \
--arg title "iOS tests — $(git rev-parse --short HEAD)" \
'{title: $title, html: $html}')"
Use a scoped token (reports:write) from CI secrets
and PATCH a saved report id, so one URL accumulates a revision per run
rather than a new orphan link every build. In GitHub Actions mark the step
if: always(). See publishing from CI.
For a one-off, drag the generated report folder into
the app — the entry HTML becomes the report
body and the screenshots upload alongside it with relative references
rewritten.
Attach the screenshots
A failed UI test assertion is close to unreadable as text. XCTAttachment
screenshots are the actual evidence, and in the normal flow they expire
with the CI artifact retention window.
Upload them as report assets and they live next to the report and the
discussion permanently — 25 MB per file, 250 MB and 500 files per report.
See the API reference.
Who the audience actually is
This is the part that makes iOS reports worth publishing more than most.
The people who need to see a failing UI test are frequently not iOS
engineers:
- The designer who wants to know whether the layout regression is real.
- The PM triaging whether to ship.
- The backend engineer whose API change broke the integration test.
None of them have Xcode open. All of them can open a URL, and all of them
can leave a comment anchored to the specific failure — which then stays
attached across runs, so a chronically flaky UI test carries its own
history rather than being re-litigated every sprint. See
commenting on HTML.
Who can see it
Per report: private, your team, any signed-in user with the link, or
public. Test reports name internal screens and API paths, so team is the
usual default. Password gates and domain-gating work on every plan. See
sharing & access control.
Limits
- Entry HTML: 5 MB. Assets: 25 MB per file, 250 MB and 500 files
total — UI test video can hit the per-file limit, so prefer screenshots
or trim the recording.
- Scripts run, sandboxed (
allow-scripts, no allow-same-origin), so
the report's filtering and collapsible sections keep working.
- 60 requests/minute per token.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.
Publish a test report →
Related