Cloud Quickstart

Stream your Appium pytest runs to the TestRelic cloud workspace with an API key.

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_STRATEGYbatch (default, upload at the end), realtime (stream as tests finish), or both.
TESTRELIC_CLOUD_TIMEOUTUpload request timeout in milliseconds (default 30000).
TESTRELIC_RUN_TYPERun-type bucket: smoke, regression, nightly, or ci.

3. (Optional) Configure cloud in a config file

You can also drive cloud upload from a cloud block in .testrelic/testrelic-config.json (found by walking up from the working directory) instead of, or alongside, environment variables. Environment variables take precedence, and a value starting with $ is read from that environment variable:

.testrelic/testrelic-config.json
{
  "cloud": {
    "apiKey": "$TESTRELIC_API_KEY",
    "upload": "realtime",
    "projectName": "mobile-app"
  }
}

Keep the API key in TESTRELIC_API_KEY (an environment variable / CI secret) and reference it with $TESTRELIC_API_KEY rather than writing the key into the file.

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

Was this page helpful?

On this page