JavaScript / TypeScript
Test Suite Monitoring for Playwright
Monitor your Playwright test suite health with TestGlance
Get Started in 3 Steps
- 1Add the JUnit reporter to your playwright.config.ts — Playwright has it built in
- 2Configure the reporter to write XML to a known path like `test-results/playwright.xml`
- 3Add the TestGlance GitHub Action to your CI workflow
Reporter Configuration
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: process.env.CI
? [['list'], ['junit', { outputFile: 'test-results/playwright.xml' }]]
: [['list']],
});GitHub Actions Workflow
# .github/workflows/test.yml
name: 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
- name: Run tests
run: npx playwright test
- name: Report to TestGlance
if: always()
uses: testglance/action@v1
with:
api-key: ${{ secrets.TESTGLANCE_API_KEY }}
report-path: test-results/playwright.xmlWhat You Get
- ✓Flaky test detection — automatically identify tests that pass and fail intermittently
- ✓Duration trends — track which tests are getting slower over time
- ✓Health score — a single metric summarizing your test suite reliability
- ✓CI summary — rich test result summaries directly in your GitHub Actions runs
FAQ
How do I configure Playwright JUnit output?
Add a JUnit reporter to your playwright.config.ts: `reporter: [["list"], ["junit", { outputFile: "test-results/playwright.xml" }]]`. The JUnit reporter is built into Playwright.
Does TestGlance detect flaky Playwright tests?
Yes. Playwright tests that pass on retry but failed initially show inconsistent results across runs. TestGlance flags these as flaky and tracks their reliability over time.
Can I track Playwright test durations?
Yes. TestGlance reads duration data from the JUnit XML report, showing you which e2e tests are getting slower and helping you identify performance regressions.
Start Monitoring Your Playwright Tests
Free to get started. Set up in under 5 minutes.
Get Started