Skip to content

Playwright reporter options

In playwright.config.ts:

import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
[
'executable-stories-playwright/reporter',
{
/* options */
},
],
],
});

The reporter uses FormatterOptions from executable-stories-formatters. Same core options as Vitest reporter options.

OptionTypeDefaultDescription
formatsOutputFormat[]["cucumber-json"]Output formats: "markdown", "html", "junit", "cucumber-json", "cucumber-messages", "cucumber-html".
outputDirstring"reports"Base directory for output files.
outputNamestring"test-results"Base filename (without extension).
outputNameTimestampbooleanfalseAppend a UTC timestamp suffix to the output filename.
outputOutputConfig{ mode: "aggregated" }Output routing configuration.
rawRunPathstringWrite the raw run JSON to disk for later CLI use.
FieldTypeDefaultDescription
mode"aggregated" | "colocated""aggregated"Single file vs one file per source.
colocatedStyle"mirrored" | "adjacent""mirrored"Colocated: mirrored under outputDir or next to source file.
rulesOutputRule[][]Pattern-based overrides (first match wins).

Nested under markdown. See Vitest config for full list.

The same top-level filtering, history, and notification options are also available in Playwright reporter config.

[
'executable-stories-playwright/reporter',
{
formats: ['markdown'],
outputDir: 'docs',
outputName: 'user-stories',
output: { mode: 'aggregated' },
markdown: {
title: 'User Stories',
includeStatusIcons: true,
includeMetadata: true,
},
},
];
[
'executable-stories-playwright/reporter',
{
formats: ['markdown', 'html', 'cucumber-json'],
outputDir: 'reports',
outputName: 'test-results',
output: { mode: 'aggregated' },
},
];
[
'executable-stories-playwright/reporter',
{
formats: ['markdown'],
outputDir: 'docs',
output: {
mode: 'colocated',
colocatedStyle: 'mirrored',
},
},
];