Skip to content

Allow keeping Playwright traces for every browser test - #323

Open
lucasacoutinho wants to merge 1 commit into
pestphp:5.xfrom
lucasacoutinho:feat/trace-on-all-tests
Open

lucasacoutinho wants to merge 1 commit into
pestphp:5.xfrom
lucasacoutinho:feat/trace-on-all-tests

Conversation

@lucasacoutinho

@lucasacoutinho lucasacoutinho commented Nov 17, 2026 •

Copy link
Copy Markdown

Summary

Browser debugging often needs the full story of a run, not only the failing test. Flaky tests, CI-only failures, and “it passed locally” bugs are easier to inspect when you can open a Playwright trace for a test that did not fail.

This is also useful in GxP-regulated environments: keeping a trace for every browser test lets you upload CI artifacts as evidence of what the suite did, which can speed up validation work.

This change targets pest-plugin-browser tracing. Today, --trace records every browser test and discards the passing ones. You can now keep traces for every test:

pest()->browser()->trace(retainOnFailure: false);
./vendor/bin/pest --trace=on

Bare --trace still keeps only failed traces. When every test is kept, Pest still opens the local viewer only for failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant