skip to content

What do Playwright's `list`, `line` and `dot` terminal reporters each print to the console?

level: middleimportance: should knowfreq 55%

answer

  1. Three ways to watch one run
  2. They differ in noise, not in detail
  3. One row, one line, one character
  4. Failures print in full regardless
  5. One option expands steps under a test

basics

~20 s

Playwright's list reporter prints one line per test with status and duration, line keeps a single updating line plus failures as they happen, and dot prints one character per test. All three print full failure detail at the end.

solid answer

~40 s

All three subscribe to the same events and differ only in progress volume. `list` prints a line per test with its title, status and duration, which makes a CI log searchable by test name; it is the default for a local run and takes `printSteps: true` to expand each `test.step` under its test. `line` collapses progress into one continuously rewritten line and prints failures above it as they occur - the usual choice for a long payroll suite you watch occasionally. `dot` emits one character per finished test, so thousands of tests fit in a few lines. Failure output is identical in all three: title path, error, source snippet and attachments in the end summary. Because they all write to stdout, list exactly one of them.

code

typescript · 9 lines
typescript
// playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [
    ['list', { printSteps: true }],
    ['html', { open: 'never' }],
  ],
});

go deeper

for a junior

Know the three names and their volume: list is a line per test, line is one line for the whole run, dot is one character per test. Failures are always printed in full at the end.

for a middle

Explain the tradeoff in terms of log volume and searchability, and note that all three write to stdout, so only one belongs in the reporter array at a time.

for a senior

Match the reporter to how the log is actually used during triage - grepped by test name, or scrolled past - and pair a quiet terminal reporter with an artifact that carries the detail.

for a principal

Treat log volume as a real cost across hundreds of jobs and set one house default, leaving verbose progress as an opt-in for the machine an engineer is watching.

## Three renderings of the same events `list`, `line` and `dot` are Playwright's terminal reporters. They subscribe to identical events and differ only in how much they print while the run is in progress; none of them changes what is considered a failure, and all three print the same detailed failure blocks. Choosing between them is a decision about log volume, not about information loss. ## `list` — one line per test The `list` reporter prints a line for each test, carrying its title and, once finished, its status and duration. In an interactive terminal the in-progress lines are updated in place; in a plain CI log each finished test lands as its own line, which makes the log greppable by test title later. It is the default when you run Playwright locally, and it is the only one of the three with a notable option: `printSteps: true` expands each test into its `test.step` titles as they execute. - The title is printed with the test's file and project, so a failure is attributable at a glance. - Finished lines carry the duration, which is the cheapest way to spot a payroll test that has started creeping past its budget. - The log stays searchable: `grep 'reconciles to the ledger'` finds the run that covered it. - The cost is one line per test, which for a few thousand payroll cases is most of the job log. ## `line` — one line for the whole run The `line` reporter keeps a single continuously rewritten line showing progress and the test that just finished, and prints failures above it as they happen. For a payroll suite of a few thousand cases this is the compromise choice: you still see failures the moment they occur, without paying a line of log per test. ## `dot` — one character per test The `dot` reporter emits a single character per finished test, so a very large run compresses into a handful of lines, with all failure detail printed in the summary at the end. It is the cheapest option for a log that is stored and rarely read line by line. | Reporter | Output volume for 500 tests | While it runs you see | Best for | | --- | --- | --- | --- | | `list` | ~500 lines | every test title and result | local runs, greppable CI logs | | `line` | a few lines plus failures | progress counter and failures | long runs where noise costs | | `dot` | a few lines | a character trail | very large suites, archived logs | ## The failure output does not shrink This is the part people get wrong when they switch to `dot` to quiet a noisy job: the summary is unchanged. All three reporters print the failing test's title path, the error and the snippet of source around it, plus the list of attachments recorded for that test. Quietening progress output does not cost you diagnosis material. ## Picking one for a payroll pipeline - Running a handful of specs on your own machine: `list`, and add `printSteps` when you are debugging a long test's structure. - A local full-suite run you glance at occasionally: `line`. - A CI job whose log is mostly scrolled past: `dot`, with an HTML or JUnit artifact carrying the detail. - A CI job whose log gets searched for a test name during triage: `list`, because each title appears on its own line. Because terminal reporters all write to stdout, list exactly one of them in the `reporter` array and let file-writing reporters carry everything else: ```ts export default defineConfig({ reporter: [ ['dot'], ['html', { open: 'never' }], ], }); ``` Swapping `dot` for `list` in that array is a one-word change, so it is worth trying both against a real job log rather than arguing about it.

  • If you switch a noisy payroll job from list to dot, what diagnostic information do you lose?
    None. The three reporters differ only in progress output; the end-of-run summary with each failing test's title path, error, source snippet and attachment list is the same. You lose the ability to grep the log for a passing test's name, which matters only if triage relies on that.
  • When is printSteps on the list reporter worth turning on?
    When a long test is hanging or slow and you want to see which `test.step` it is inside without opening a report. It prints each step title under its test as the step runs. It roughly multiplies the log volume by the number of steps, so it suits local debugging more than a permanently noisy CI job.

saying these in an interview costs you the question

  • Thinks the dot reporter hides failure details
  • Believes line and list differ in what they check
  • Runs two terminal reporters and wonders why output interleaves
  • Assumes dot cannot be used with an HTML report
  • Thinks printSteps is an html reporter option