Skip to main content
Ask AI

Cloud Quickstart

By default testrelic-appium writes a local timeline and HTML report. Add an API key and your runs also upload to the TestRelic cloud, where you can browse sessions, share results, and ask AI about failures.

1. Get an API key

Create a key in the TestRelic platform — see API keys. Keep it secret; treat it like a password.

2. Set the environment variable

Export your key before running pytest:

export TESTRELIC_API_KEY="trk_your_key_here"

The plugin uploads to the default cloud endpoint, https://platform.testrelic.ai/api/v1. The full set of cloud environment variables:

VariablePurpose
TESTRELIC_API_KEYAPI key used to authenticate uploads.
TESTRELIC_CLOUD_ENDPOINTOverride the cloud endpoint (default https://platform.testrelic.ai/api/v1).
TESTRELIC_UPLOAD_STRATEGYHow and when timelines are uploaded.
TESTRELIC_CLOUD_TIMEOUTUpload request timeout.
TESTRELIC_RUN_TYPETag the run type for the workspace.

3. (Optional) Configure cloud in pyproject.toml

You can also drive cloud upload from your testrelic_options cloud object instead of (or alongside) environment variables:

pyproject.toml
[tool.pytest.ini_options]
testrelic_options = [
"cloud={'uploadStrategy': 'end-of-session'}",
]
tip

Keep the API key in TESTRELIC_API_KEY (an environment variable / CI secret) and use the cloud object only for non-secret behavior like the upload strategy.

4. Run your tests

pytest

If the network is unavailable, timelines are written to the offline queue (.testrelic/queue/) and can be flushed later with testrelic-appium drain.

5. Confirm the session

Open the platform and find your run:

Next steps