Skip to content

Setup decision tree

Use this page to pick packages and commands without reading every README first.

Integrate story tests into an existing test suite

Section titled “Integrate story tests into an existing test suite”
  1. Install the adapter for your framework or language (see Package map).
  2. Configure the reporter with rawRunPath so CI writes RawRun JSON.
  3. Add executable-stories-formatters for report generation.
Stack Package Reporter config
Vitest executable-stories-vitest StoryReporter + rawRunPath
Jest executable-stories-jest Jest reporter + rawRunPath
Playwright executable-stories-playwright Playwright reporter + rawRunPath
Cypress executable-stories-cypress Cypress reporter + rawRunPath
Go / pytest / Ruby / Rust / JVM / .NET language package default .executable-stories/raw-run.json

Quick bootstrap for JS projects: executable-stories-init.

After tests write RawRun JSON:

Terminal window
executable-stories format reports/raw-run.json --format html,markdown --output-dir reports

For a Starlight/Astro docs site from artifacts: executable-stories-demo or formatters init-astro — see Astro docs site.

Emit machine artifacts in CI:

Terminal window
executable-stories format reports/raw-run.json \
--format story-report-json,scenario-index-json,behavior-manifest-json \
--output-dir reports \
--output-name index

Optional MCP: MCP server (executable-stories-mcp).

Full contract: Agent artifact contract.

  1. Generate StoryReport JSON in CI (see above).
  2. Install executable-stories-react.
  3. Render the report in your app — see Embed reports in React apps.

Non-JS adapters must produce RawRun compatible with the shared formatter pipeline. See Cross-language parity and run:

Terminal window
pnpm run verify:go
pnpm run verify:pytest
pnpm run verify:ruby
# … etc.
./scripts/verify-all.sh
Package Use it for Not for
executable-stories-formatters CLI, all output formats, validation In-test story API
executable-stories-init First-time JS wiring Non-JS adapters
executable-stories-demo Demo/publish site from artifacts In-process test API
executable-stories-react Product UI embedding Static HTML reports (use formatters HTML)
executable-stories-mcp Agent query + focused runs Replacing your test runner

Monorepo example apps include report:agents:

Terminal window
cd apps/vitest-example && pnpm test:report

This runs tests, then generates StoryReport, scenario index, and behavior manifest under reports/.