Skip to content

Installation (Playwright)

Terminal window
pnpm add -D @playwright/test executable-stories-playwright executable-stories-formatters

Or with npm:

Terminal window
npm install -D @playwright/test executable-stories-playwright executable-stories-formatters

In playwright.config.ts, add the reporter using the package path so Playwright loads it correctly:

import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
[
'executable-stories-playwright/reporter',
{
formats: ['markdown'],
outputDir: 'docs',
outputName: 'user-stories',
output: { mode: 'aggregated' },
},
],
],
// ... rest of config
});

With the option above, the reporter writes to docs/user-stories.md. Run your tests:

Terminal window
pnpm playwright test

The Markdown file is generated after the test run.

First Story (Playwright) — write your first scenario.

Playwright reporter options — all configuration options.