playwright-test-manager-reporter
v1.0.5
Published
Official Playwright test reporter for Playwright Test Manager
Maintainers
Readme
@playwright-test-manager/reporter
Official Playwright test reporter for Playwright Test Manager - track your test results, identify flaky tests, and monitor test performance over time.
Installation
npm install --save-dev @playwright-test-manager/reporter
Quick Start
1. Get Your API Key
- Sign up at Playwright Test Manager
- Create a project
- Copy your API key from project settings
2. Configure Playwright
Add the reporter to your playwright.config.ts:
import { defineConfig } from '@playwright/test';
export default defineConfig({ reporter: [ ['list'], // Keep default console output ['@playwright-test-manager/reporter', { apiKey: 'your-api-key-here', apiUrl: 'https://backend-production-34fb.up.railway.app', // optional }] ], // ... rest of your config });
3. Run Your Tests
Your test results will be automatically uploaded to Playwright Test Manager! 🎉
Configuration Options
| Option | Type | Required | Default | Description |
|--------|------|----------|---------|-------------|
| apiKey | string | ✅ Yes | - | Your project API key |
| apiUrl | string | ❌ No | Production URL | Custom backend URL |
| enabled | boolean | ❌ No | true | Enable/disable reporter |
Features
- 📊 Test History - Track test results over time
- 🔍 Flaky Test Detection - Automatically identify unreliable tests
- 📈 Performance Monitoring - Monitor test duration trends
- 🌳 Branch Tracking - Compare results across branches
- 🚀 CI/CD Integration - Works with GitHub Actions, GitLab CI, CircleCI, and more
CI/CD Setup
The reporter automatically detects CI environments and captures metadata:
GitHub Actions
name: Run Playwright tests run: npx playwright test env: PTM_API_KEY: ${{ secrets.PTM_API_KEY }}
Update your playwright.config.ts:
reporter: [ ['@playwright-test-manager/reporter', { apiKey: process.env.PTM_API_KEY || '', }] ]
Example Output
🎭 Playwright Test Manager Reporter initialized Run ID: 550e8400-e29b-41d4-a716-446655440000 API URL: https://backend-production-34fb.up.railway.app Branch: main
🚀 Starting test run 550e8400-e29b-41d4-a716-446655440000 ✅ Login test (1234ms) ✅ Dashboard test (2345ms) ❌ Profile test (3456ms)
📤 Sending 3 test results... ✅ Sent 3 test results
✨ Test run completed successfully! Total: 3 tests Passed: 2 ✅ Failed: 1 ❌ Skipped: 0 ⏭️ Duration: 7.04s View results: https://your-app-url.com/runs/550e8400-e29b-41d4-a716-446655440000
Troubleshooting
Reporter not sending results
- Check your API key is correct
- Verify backend URL is accessible
- Check console output for error messages
Results not appearing in dashboard
- Ensure you're logged into the correct project
- Check project API key matches the one in config
- Verify network connectivity to backend
Support
License
MIT © kubaszy
