Playwright Console Reporter

1.0.2 · active · verified Tue Apr 21

playwright-console-reporter is a custom console reporter for Playwright tests, currently at version 1.0.2. It enhances the standard Playwright console output by capturing detailed test steps and results, then transforming them into structured, human-readable reports directly within the terminal. This provides developers with immediate, in-depth insights into test suite performance and execution flow, allowing for quick analysis of failures and bottlenecks without the need to navigate external HTML or JUnit report files. The package is actively maintained, with releases likely following Playwright's own update cadence or as features and bug fixes are introduced. Its key differentiator lies in its focus on comprehensive, structured console logging, contrasting with Playwright's built-in `list` or `dot` reporters which offer less detail, or `html`/`json` reporters which require opening separate files for detailed review. It aims to streamline debugging and daily development workflows by keeping all relevant test information visible in the terminal.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to integrate the playwright-console-reporter into your existing Playwright configuration file, alongside other reporters.

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

let reporters: PlaywrightTestConfig['reporter'] = [
  ['junit', { outputFile: 'build/results.xml' }],
  ['html', { outputFolder: 'build/html-report', open: 'never' }],
  ['list']
];

// Add the console reporter
reporters.push(['playwright-console-reporter', {}]);

const config: PlaywrightTestConfig = {
  reporter: reporters,
  // other Playwright configurations...
};

export default config;

// To ensure detailed reports are printed line by line, set this environment variable before running tests:
// PLAYWRIGHT_FORCE_TTY=false

view raw JSON →