How to open and read a Playwright trace
Record a trace while running the failing test and open the resulting trace.zip in Playwright Trace Viewer. Start at the first failed action, then compare its before and after snapshots and related requests.
Skaybase
Generate and open a local trace
Run the commands from your own Playwright project. Find the trace using the HTML report or the output path printed by your configuration. In shared CI, trace: 'on-first-retry' can keep routine artifact volume manageable.
npx playwright test checkout.spec.ts --trace on
npx playwright show-trace path/to/trace.zipRead the trace in the order a user experienced the failure
- Find the failed assertion and inspect the immediately preceding actions.
- Compare the snapshots around the failing action. Look for a missing heading, an overlay, or a control that stayed disabled.
- Check the action log and timeline. Review relevant console or network observations.
- Compare against a successful run when the same step sometimes passes.
Put the useful evidence in the report
For example, ‘Select Apply coupon, then Pay now remains disabled’ points to the failing transition. Attach the smallest useful image or clip and link the restricted CI trace for teammates who need more detail.
Trace files can include DOM snapshots, source and network information. Keep them in approved storage and use test data. A short capture is easier to share when the issue was found manually.