Upload existing reports
testrelic upload imports test reports you already produce — Allure result directories
or JUnit XML — into TestRelic Cloud, so historical and third-party runs land alongside
runs from the SDK reporters.
Cloud-only, ingest key required
testrelic upload is Cloud-only and requires a tr_live_* ingest key — the same key
the SDKs use to POST runs. A tr_mcp_* personal access token (used for the agent and MCP
host) does not work here. Pass the key with --api-key or set TESTRELIC_API_KEY.
Usage
# Allure results directory
testrelic upload --format allure ./allure-results \
--repo my-org/checkout \
--branch main \
--environment staging \
--run-type regression \
--api-key tr_live_xxxxxxxx
# JUnit XML
testrelic upload --format junit ./reports/junit.xml \
--repo my-org/checkout \
--run-type ci
Or provide the key via the environment:
export TESTRELIC_API_KEY=tr_live_xxxxxxxx
testrelic upload --format allure ./allure-results --repo my-org/checkout
Flags
| Flag | Purpose |
|---|---|
--format allure|junit | Report format to import: an Allure results directory or a JUnit XML file. |
--repo | Repository the runs belong to. |
--repo-git-id | Normalized git remote id, to bind the upload to the same repo as live runs. |
--branch | Branch the runs are for. |
--commit | Commit the runs are for. |
--environment | Environment the runs executed in (e.g. staging). |
--run-type smoke|regression|nightly|ci | Classifies the run. |
--api-key | tr_live_* ingest key (or set TESTRELIC_API_KEY). |
--no-artifacts | Skip uploading attached artifacts (screenshots, traces). |
--dry-run | Parse and validate the report and show what would be sent, without uploading. |
Validate first
Run with --dry-run to confirm the report parses and the metadata is right before sending
anything to the cloud.