TestRelic
CLI

Upload existing reports

Import existing Allure or JUnit test reports into TestRelic Cloud with testrelic upload — a Cloud-only command that uses a tr_live_* ingest key.

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

FlagPurpose
--format allure|junitReport format to import: an Allure results directory or a JUnit XML file.
--repoRepository the runs belong to.
--repo-git-idNormalized git remote id, to bind the upload to the same repo as live runs.
--branchBranch the runs are for.
--commitCommit the runs are for.
--environmentEnvironment the runs executed in (e.g. staging).
--run-type smoke|regression|nightly|ciClassifies the run.
--api-keytr_live_* ingest key (or set TESTRELIC_API_KEY).
--no-artifactsSkip uploading attached artifacts (screenshots, traces).
--dry-runParse 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.

Next steps

Authentication · Modes & engines

Was this page helpful?

On this page