A single monorepo of TestRelic SDK demos, organized by language and then framework:
nodejs/ JavaScript / TypeScript demos (@testrelic/* npm packages)
playwright/ Web E2E + API tests
appium/ Android UI tests (WebdriverIO + Appium 2)
maestro/ Mobile flows
mobile-apps/ Shared mobile binaries (apk/ipa ignored by git)
python/ Python demos (testrelic-* PyPI packages)
testrelic-pytest-demo/ pytest across all API protocols (REST/GraphQL/gRPC/
WebSocket/Kafka/MCP) + Playwright + DeepEval + Appium,
uploading real runs to the TestRelic cloud
NodeJS demos (nodejs/)
| Area | Stack | What it demonstrates |
|---|---|---|
| playwright | Playwright + @testrelic/playwright-analytics |
Web E2E and API tests (incl. multi-page Amazon crawl), analytics reports |
| appium | WebdriverIO + Appium 2 + @testrelic/appium-analytics |
Android UI tests on the real Wikipedia app from a shared APK, local + optional cloud reports |
| maestro | Maestro + @testrelic/maestro-analytics |
Mobile flows on the same Wikipedia app |
Python demos (python/)
| Area | Stack | What it demonstrates |
|---|---|---|
| testrelic-pytest-demo | pytest + testrelic-pytest / testrelic-playwright / testrelic-deepeval / testrelic-appium |
All API protocols (REST/GraphQL/gRPC/WebSocket/Kafka/MCP), an LLM-eval suite, and a regression→recovery seed arc, all uploading to the TestRelic cloud. See python/testrelic-pytest-demo/README.md. |
Note: the Python demo currently installs the SDKs editable from the private
testrelic-platformmonorepo (a sibling checkout) because the protocol features requiretestrelic-pytest >= 0.2while PyPI is at0.1.1. Once>= 0.3is published, itsrequirements.txtswitches to pinned PyPI versions.
Shared mobile binaries live under nodejs/mobile-apps (ignored by git). Populate wikipedia.apk with:
node nodejs/mobile-apps/download-wikipedia-apk.mjsSee nodejs/mobile-apps/README.md.
Windows: the Makefile targets use bash-style cd chains. Use Git Bash or WSL, or run the npm / npx commands from each project’s README directly in PowerShell.
Playwright (nodejs/playwright/)
See nodejs/playwright/README.md for the examples table and commands.
cd nodejs/playwright/api-testing
npm install
npx playwright testBrowser examples need Chromium:
cd nodejs/playwright/wikipedia
npm install
npx playwright install chromium
npx playwright testUses the page fixture for navigation tracking — load timing, DOM content loaded, network idle, and request statistics.
import { test, expect } from '@testrelic/playwright-analytics/fixture';
test('homepage loads', { tag: ['@e2e'] }, async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveTitle(/Example/);
});Uses the request fixture — no browser. See playwright/api-testing.
Uses both page and request in one test. See playwright/unified-testing.
Add the TestRelic reporter to playwright.config.ts (each example under playwright/ already does this, including optional cloud upload when TESTRELIC_API_KEY is set — with repo-root dotenv, scripts/apply-testrelic-staging-env.mjs copies TESTRELIC_STAGE_API_KEY → TESTRELIC_API_KEY and sets TESTRELIC_CLOUD_ENDPOINT to TESTRELIC_STAGE_CLOUD_ENDPOINT or, if unset, https://stage.testrelic.ai/api/v1; see .env.example):
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
['@testrelic/playwright-analytics', {
outputPath: './test-results/analytics-timeline.json',
includeStackTrace: true,
includeCodeSnippets: true,
includeNetworkStats: true,
cloud: {
apiKey: process.env.TESTRELIC_API_KEY,
upload: 'both',
uploadArtifacts: true,
artifactMaxSizeMb: 10,
timeout: 30_000,
},
}],
],
});See nodejs/playwright/README.md for cloud setup and per-example .testrelic/testrelic-config.json project names.
| Option | Type | Default | Description |
|---|---|---|---|
trackApiCalls |
boolean |
true |
Enable/disable API call tracking |
captureRequestBody |
boolean |
true |
Capture request body |
captureResponseBody |
boolean |
true |
Capture response body |
redactHeaders |
string[] |
['authorization', 'cookie', 'set-cookie', 'x-api-key'] |
Headers to redact |
redactBodyFields |
string[] |
['password', 'secret', 'token', 'apiKey', 'api_key'] |
Body fields to redact |
apiIncludeUrls |
(string | RegExp)[] |
[] |
Only track matching URLs |
apiExcludeUrls |
(string | RegExp)[] |
[] |
Exclude matching URLs |
See nodejs/playwright/api-testing for configuration demos and the npm package readme for the full reference.
Appium (nodejs/appium/)
Uses ../mobile-apps/wikipedia.apk (see nodejs/mobile-apps/README.md) and @testrelic/appium-analytics (service + reporter in wdio.conf.ts, optional cloud when TESTRELIC_API_KEY is set). See nodejs/appium/README.md.
cd nodejs/appium
npm install
npx appium driver install uiautomator2
npm testMaestro (nodejs/maestro/)
Install the Wikipedia APK on a device or emulator, then:
cd nodejs/maestro
npm install
npm testUses the TestRelic Maestro wrapper (testrelic-maestro) and .testrelic/testrelic-config.json for dashboard project naming and optional cloud. Details: nodejs/maestro/README.md.
Python (python/testrelic-pytest-demo/)
cd python/testrelic-pytest-demo
python -m venv .venv && .venv/Scripts/activate # PowerShell: .venv\Scripts\Activate.ps1
pip install -r requirements.txt
python verification/verify.py # offline proof — asserts every metric reaches the wireCovers testrelic-pytest across all API protocols, plus testrelic-deepeval,
testrelic-playwright, and testrelic-appium. See
python/testrelic-pytest-demo/README.md.
- Node.js >= 18 (NodeJS demos)
- Playwright >= 1.35.0 (Playwright examples)
- Python >= 3.10 (Python demos)
- Android SDK / Maestro CLI / JDK as described in the Appium and Maestro READMEs
MIT