Telemetry-based automatic snapshot capture for LiveView tests.
Attaches to Phoenix LiveView telemetry events to automatically capture snapshots when LiveView events occur, with no test code changes required.
Summary
Functions
Attaches telemetry handlers for automatic snapshot capture.
Clears all captured snapshots.
Detaches telemetry handlers.
The Ecto [..., :query] telemetry events for the configured :ecto_repos.
Returns and clears the Ecto queries accumulated in the current process since the last flush, oldest first. Called at each captured event so queries are attributed to the event that ran them.
Retrieves all captured snapshots and clears the table.
Handles telemetry events and captures snapshots.
Writes captured snapshots to timeline.json.
Functions
Attaches telemetry handlers for automatic snapshot capture.
Call this before running tests to enable auto-capture.
Clears all captured snapshots.
Detaches telemetry handlers.
The Ecto [..., :query] telemetry events for the configured :ecto_repos.
Returns and clears the Ecto queries accumulated in the current process since the last flush, oldest first. Called at each captured event so queries are attributed to the event that ran them.
Retrieves all captured snapshots and clears the table.
Handles telemetry events and captures snapshots.
Writes captured snapshots to timeline.json.
Note: HTML snapshot files are NOT generated from telemetry capture.
For real accessibility testing, use html_snapshot(view) in your tests
to capture actual rendered HTML.
Runs in the on_exit installed by use Excessibility, so a failure
here is logged rather than raised — instrumentation must not fail the
test it observes.