---
title: Behaviour viewer
description: Generate a static interactive explorer for Pest Flow behaviour.
---

Generate the interactive viewer after Pest runs your tests:

~~~sh
vendor/bin/pest --flow-report
~~~

Pest writes `build/pest-flow/index.html` by default and creates the output directory when needed.
Open the file directly in a browser, or publish the directory as a CI artifact or static site.
The report has no server-side requirements or external asset dependencies.

Pass a directory to choose another output location:

~~~sh
vendor/bin/pest --flow-report=docs/behaviour
~~~

The viewer presents features, rules, scenarios, standalone scenarios, recorded steps, direct tags,
source file and line values, execution status, and duration when available. Features and standalone
scenarios start collapsed; expand a feature to reveal its rules, then a rule to reveal its scenarios.
Expand a scenario to inspect its ordered Given, When, and Then steps. Search and filters reveal the
matching scenarios and their ancestry.

Use the search box to find feature names, rule names, scenario names, step descriptions, and tags.
Use the filters to narrow results by status, tag, feature, rule, or source file. A matching step
keeps its scenario and parent feature and rule visible. The status filter also matches step status,
so you can find failed steps.

Tags remain listed on the feature, rule, or scenario where they were declared. A selected feature or
rule tag also matches its descendant scenarios.

Use **Copy location** to copy a recorded source file and line. The viewer does not assume that a
source path can be opened from a local or published report.

Feature, rule, and scenario counts include every behaviour definition loaded by Pest. Step nodes are
recorded when a scenario runs, so a filtered run can show an unexecuted scenario as `Pending` with
no recorded steps. The status summary counts scenarios for the current run and includes `Pending`.
Tags shown on each node are the tags declared directly on that node.

Pest still returns its normal failing exit code when a scenario fails. Pest Flow writes the report
if report generation succeeds. The process-local registry is unavailable with `--parallel`, so
the viewer cannot be generated in parallel mode.
