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:
| Variable | Purpose |
|---|---|
TESTRELIC_API_KEY | API key used to authenticate uploads. |
TESTRELIC_CLOUD_ENDPOINT | Override the cloud endpoint (default https://platform.testrelic.ai/api/v1). |
TESTRELIC_UPLOAD_STRATEGY | batch (default, upload at the end), realtime (stream as tests finish), or both. |
TESTRELIC_CLOUD_TIMEOUT | Upload request timeout in milliseconds (default 30000). |
TESTRELIC_RUN_TYPE | Run-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:
{
"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
pytestIf 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:
- The Test Runs dashboard lists every uploaded run.
- Click into a run to open the session workspace and explore the command timeline, screenshots, device logs, and network capture.