Cloud Platform Quickstart
This guide takes you from zero to your first TestRelic cloud session in under 10 minutes. You will sign up, install the reporter, run a test, and explore the result in the cloud platform.
Prerequisites
- Node.js ≥ 18 and npm/yarn/pnpm
- An existing Playwright project (or the ability to create one)
- A testrelic.ai account (create one for free below)
Step 1 — Create your account
- Go to testrelic.ai and click Sign Up.
- Enter your name, email address, and a password.
- Check your inbox for a verification code and enter it on the verification screen.
After verifying your email, the onboarding wizard walks you through setting your profile, choosing your framework (Playwright), and generating your first API key. See the Onboarding guide for the full walkthrough.
Step 2 — Install the reporter
In your Playwright project directory:
npm install --save-dev @testrelic/playwright-analytics
Step 3 — Configure the reporter
Add the TestRelic reporter to your playwright.config.ts. Use your API key and repository ID from the onboarding wizard or the API Keys settings page.
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
[
'@testrelic/playwright-analytics',
{
apiKey: process.env.TESTRELIC_API_KEY,
repoId: process.env.TESTRELIC_REPO_ID,
},
],
],
// ... rest of your config
});
Set the environment variables. In development, add them to a .env file (never commit this file):
# Never commit this file — add .env to .gitignore
TESTRELIC_API_KEY=your_api_key_here
TESTRELIC_REPO_ID=your_repo_id_here
Load environment variables from .env using a tool like dotenv or your shell profile. Playwright v1.49+ loads .env automatically if you use npx playwright test.
CI configuration
- GitHub Actions
- GitLab CI
name: Playwright Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test
env:
TESTRELIC_API_KEY: ${{ secrets.TESTRELIC_API_KEY }}
TESTRELIC_REPO_ID: ${{ secrets.TESTRELIC_REPO_ID }}
playwright:
image: mcr.microsoft.com/playwright:v1.49.0-noble
variables:
TESTRELIC_API_KEY: $TESTRELIC_API_KEY
TESTRELIC_REPO_ID: $TESTRELIC_REPO_ID
script:
- npm ci
- npx playwright test
Step 4 — Run your tests
npx playwright test
The reporter runs alongside your tests. After the run completes, it uploads the data to the TestRelic cloud platform automatically. You should see a confirmation line in the reporter output:
✓ TestRelic: Run uploaded — https://testrelic.ai/dashboards/test-runs/<runId>
Step 5 — Explore the result in the platform
- Click the URL printed by the reporter, or navigate to the Test Runs dashboard.
- You should see your test run in the list. Click it to open the Run Detail view.
- Click any test case row to open the Session Workspace — the full DevTools-style inspection view.
What to explore next
| Feature | What to try |
|---|---|
| Session Workspace | Inspect steps, console output, network requests, and video |
| AI Insights | On a failing test, check the Insights tab for AI-generated defect analysis (Growth plan) |
| Ask AI | Ask "What were the most common failures in the last 7 days?" |
| Test Navigation | See a graph of all URL navigation flows captured in your sessions |
| Repositories | View repo-level health metrics, pass rates, and framework setup snippets |
Troubleshooting
Reporter output says "API key invalid"
Double-check the TESTRELIC_API_KEY value in your environment. Ensure there are no extra spaces. Verify the key is active in API Keys settings.
No run appears in the dashboard
Ensure your network can reach api.testrelic.ai. Check if a corporate proxy or firewall is blocking outbound HTTPS. The reporter logs connection errors at the end of the test run.
Runs appear but sessions are missing data
Video capture requires video: 'on' or video: 'retain-on-failure' in your Playwright config. Network data requires the reporter's captureNetwork option to be enabled (default: true).
Need more detail? See the full configuration reference for all reporter options.