Skip to main content
Ask AI

Cloud Quickstart

This guide takes you from a fresh API key to results in the dashboard.

1. Create an API key

Generate a key from the dashboard. See API keys for the full flow.

2. Set the API key

Terminal
export TESTRELIC_API_KEY=tr_live_...

You can also pass it per run with --testrelic-pytest-api-key VALUE.

3. Choose an upload strategy

--testrelic-pytest-upload-strategy (env TESTRELIC_UPLOAD_STRATEGY) controls when results are sent. The default is batch.

ValueBehavior
batchSend results at the end of the run (default)
realtimeSend results as tests complete
bothSend both in realtime and as a batch
noneDon't upload (useful for dry runs)

4. Choose a run-type

--testrelic-pytest-run-type (env TESTRELIC_RUN_TYPE) buckets the run on the dashboard. Valid values: smoke, regression, nightly, ci.

Terminal
pytest \
--testrelic-pytest-upload-strategy batch \
--testrelic-pytest-run-type smoke

5. Run

Terminal
pytest

6. Confirm in the dashboard

Open the Test Runs dashboard to confirm the run appeared. Runs are grouped by your run-type bucket.

tip

If the cloud was unreachable during the run, uploads are saved to the offline queue (.testrelic/queue/). Replay them with testrelic-pytest drain once connectivity returns.

Next steps