Skip to content

Enabling the HTML Reporter

When to Use

Use this when configuring the HTML reporter in your Playwright project — either as the only reporter or alongside others.

Decision

Situation Choose Why
Only need HTML report reporter: 'html' Simplest form
Need HTML + terminal output [['list'], ['html']] Multiple reporters run in parallel
Temporary override without editing config --reporter=html CLI flag Takes precedence over config

Pattern

Minimal config:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: 'html',
});

Combined reporters:

export default defineConfig({
  reporter: [
    ['list'],
    ['html'],
    ['json', { outputFile: 'results.json' }],
  ],
});

CLI override:

npx playwright test --reporter=html
npx playwright test --reporter=html,list

Common Mistakes

  • Wrong: reporter: ['html', 'list'] as flat strings → Right: multi-reporter needs [['list'], ['html']] — nested arrays
  • Wrong: including html locally but forgetting it in CI config → Right: CI artifacts have no triage UI without it; include both places

See Also