@edgetesting/playwright-reporter
v1.0.0
Published
Custom Playwright reporter that syncs test results to EdgeTesting — auto-creates bug reports and uploads artifacts on failure
Maintainers
Readme
@edgetesting/playwright-reporter
A custom Playwright reporter that syncs test results to EdgeTesting. On failure it automatically creates a bug report, posts a comment to the linked Jira issue, and uploads trace/video/screenshot artifacts.
Requirements
- Node.js 18+
- Playwright 1.40+
- An EdgeTesting workspace with an API key
Installation
npm install @edgetesting/playwright-reporterSetup
1. Add to playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
trace: 'on-first-retry',
video: 'on-first-retry',
screenshot: 'only-on-failure',
},
reporter: [
['list'],
['@edgetesting/playwright-reporter', {
apiKey: process.env.EDGETESTING_API_KEY,
apiUrl: process.env.EDGETESTING_API_URL,
}],
],
});2. Set environment variables
EDGETESTING_API_KEY=et_xxxx # from Settings → API Keys
EDGETESTING_API_URL=https://your-edgetesting-instance.com3. Annotate your tests
import { test, expect } from '@playwright/test';
test('Login works', {
annotation: { type: 'automation_id', description: 'TC-42' },
}, async ({ page }) => {
await page.goto('/login');
// ...
});Get the TC-xxx ID from EdgeTesting by opening any Jira issue and expanding a test case card.
Options
| Option | Type | Default | Description |
|---|---|---|---|
| apiKey | string | EDGETESTING_API_KEY env | Your EdgeTesting API key |
| apiUrl | string | EDGETESTING_API_URL env | Base URL of your EdgeTesting instance |
| uploadArtifacts | boolean | true | Upload trace/video/screenshot on failure |
Annotation formats
// Recommended
annotation: { type: 'automation_id', description: 'TC-42' }
// Shorthand
annotation: [{ type: '@TC-42' }]What happens on failure
- Bug report created in EdgeTesting with the error message and failed step
- Comment posted to the linked Jira issue with full details
- Playwright trace, video, and screenshot uploaded to the bug report
- Jira assignee notified by email and in-app notification
License
MIT
