Skip to content

Installation (pytest)

Terminal window
pip install executable-stories-pytest

Requires Python 3.12 or later and pytest.

The package registers itself as a pytest plugin automatically. No changes to pytest.ini, pyproject.toml, or conftest.py are needed. Import story in your test file and start recording:

from executable_stories import story

After pytest finishes, the plugin writes .executable-stories/raw-run.json. Pass that file to executable-stories-formatters to render a report.

Terminal window
npx executable-stories-formatters format --input .executable-stories/raw-run.json --format markdown

Install the formatters package once in your Node project or CI job:

Terminal window
npm install -D executable-stories-formatters

First Story (pytest) — write your first pytest scenario.

pytest story & doc API — steps, docs, and adapter options.