Skip to main content

Reporters

A reporter decides how test results are presented: a live console stream, a browsable HTML site, machine-readable JSON or JUnit XML for CI, or a shardable blob you merge later. Taqwright runs on the Playwright test runner, so every Playwright reporter is available.

For the quick reporter table and the per-project report-directory pattern, see Running and debugging. This page is the full reference: each reporter's options, the sharding/merge flow, and writing your own.

Configure a reporter

Set the reporter on the command line or in taqwright.config.ts. The CLI flag wins for that run:

npx taqwright test --reporter dot
taqwright.config.ts
import { defineConfig, Platform } from '@taqwright/taqwright';

export default defineConfig({
reporter: 'line',
projects: [/* ... */],
});

Run several reporters at once with the array-of-tuples form, each an optional options object:

taqwright.config.ts
export default defineConfig({
reporter: [
['list'],
['html', { open: 'never' }],
['json', { outputFile: 'reports/results.json' }],
],
projects: [/* ... */],
});

Pick reporters by environment, for example concise output on CI:

taqwright.config.ts
export default defineConfig({
reporter: process.env.CI ? 'dot' : [['list'], ['html', { open: 'never' }]],
projects: [/* ... */],
});

If you omit reporter, the default is list. taqwright init scaffolds [['list'], ['html', { open: 'never', title: 'Taqwright Test Report' }]].

Some reporters need the array form

The typed reporter string accepts list, line, dot, html, json, and junit. The blob, github, and null reporters (and custom reporter paths) are passed through the array-of-tuples form instead, for example reporter: [['blob']]. All of them run on the Playwright runner underneath.

Built-in reporters

list

The default for local runs. Prints one line per test as it finishes, with failures inline. Good for interactive work.

npx taqwright test --reporter list

line

More compact than list: a single updating progress line, with failures printed as they happen. Useful for larger suites.

dot

The most concise: one character per test (· pass, F fail, and so on). A common choice on CI where logs should stay short.

html

Produces a self-contained, browsable report folder (default playwright-report/). Taqwright re-brands it with a Taqwright title and favicon. Open it with the CLI (see Command line):

taqwright.config.ts
export default defineConfig({
reporter: [['html', { open: 'never', outputFolder: 'reports/html' }]],
projects: [/* ... */],
});
npx taqwright show-report reports/html
OptionDescription
openWhen to auto-open the report: 'always', 'never', or 'on-failure'.
outputFolderWhere the report is written. Default playwright-report.
titleCustom tab title for the report.

json

Writes a single JSON object describing the whole run, for custom tooling. Give it an outputFile, otherwise it prints to stdout and collides with console reporters:

reporter: [['json', { outputFile: 'reports/results.json' }]]

junit

Writes JUnit-style XML that most CI systems (Jenkins, GitLab, Azure) can ingest. Also needs an outputFile.

reporter: [['junit', { outputFile: 'reports/results.xml' }]]
OptionDescription
outputFilePath to the XML file.
includeProjectInTestNamePrefix each test name with its project.
stripANSIControlSequencesRemove ANSI colour codes from the output.

blob

A shardable archive containing the full run detail. It is not meant to be read directly; you merge blobs from multiple shards into one report (see Merging reports).

reporter: [['blob', { outputDir: 'reports/blob' }]]

github

Surfaces failures as GitHub Actions annotations in the workflow and pull-request checks. It is CI-only; add it through the array form, gated on CI:

taqwright.config.ts
export default defineConfig({
reporter: [
['list'],
['html', { open: 'never' }],
...(process.env.CI ? [['github'] as [string]] : []),
],
projects: [/* ... */],
});

null

Produces no output. Useful when another tool consumes results programmatically.

Two practical rules

Use only one console reporter at a time (list, line, or dot), and always give json / junit an explicit outputFile so they do not write to stdout over the console reporter. See Running and debugging for these and for isolating report directories per project.

Merging reports

For sharded or parallel runs, have each shard write the blob reporter, then merge the blobs into a single report. Split the run with --shard (see Parallelism):

# Shard 1 of 3, writing a blob
npx taqwright test --shard 1/3 --reporter blob

# ... shards 2/3 and 3/3 likewise, all writing into reports/blob ...

# Merge every blob into one HTML report
npx taqwright merge-reports reports/blob --reporter html

merge-reports is covered in Command line. show-report can also open a blob archive directly.

Custom reporters

Write your own reporter by implementing Playwright's Reporter interface and default-exporting the class. The hooks fire exactly as they do under Playwright:

reporters/my-reporter.ts
import type { Reporter, TestCase, TestResult } from '@playwright/test/reporter';

export default class MyReporter implements Reporter {
onTestEnd(test: TestCase, result: TestResult) {
console.log(`${test.title}: ${result.status}`);
}

onEnd(result: { status?: string }) {
console.log(`Finished: ${result.status}`);
}
}

Register it by module path through the array form, or on the command line:

taqwright.config.ts
export default defineConfig({
reporter: [['./reporters/my-reporter.ts']],
projects: [/* ... */],
});
npx taqwright test --reporter ./reporters/my-reporter.ts

Taqwright forwards the path to the Playwright runner unchanged, so any reporter written for Playwright works here.

See Configuration for where reporter sits in the full config.